fix: made reading of storage configuration protected by read lock
@@ -449,6 +449,7 @@ public class OIndexManagerShared implements OIndexManagerAbstract {
protected void releaseExclusiveLock(boolean save) {
int val = writeLockNesting.decrementAndGet();
ODatabaseDocumentInternal database = getDatabaseIfDefined();
+ try {
if (val == 0 && database != null) {
if (save) {
this.setDirty();
@@ -459,8 +460,9 @@ public class OIndexManagerShared implements OIndexManagerAbstract {
.getSchema()
.forceSnapshot(ODatabaseRecordThreadLocal.instance().get());
}
-
+ } finally {
internalReleaseExclusiveLock();
+ }
if (val == 0 && database != null) {
for (OMetadataUpdateListener listener : database.getSharedContext().browseListeners()) {
