fix: minor correction to make sure to unlock views in all the cases
@@ -350,6 +350,7 @@ public class ViewManager {
return;
}
lockView(view);
+ try {
view.addClusterId(cluster);
for (int i : view.getClusterIds()) {
if (i != cluster) {
@@ -370,9 +371,11 @@ public class ViewManager {
oldIndexesPerViews.put(idx, viewName);
});
viewImpl.inactivateIndexes();
- viewImpl.addActiveIndexes(indexes.stream().map(x -> x.getName()).collect(Collectors.toList()));
-
+ viewImpl.addActiveIndexes(
+ indexes.stream().map(x -> x.getName()).collect(Collectors.toList()));
+ } finally {
unlockView(view);
+ }
cleanUnusedViewIndexes(db);
cleanUnusedViewClusters(db);
}
