You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FDBDirectory: When file lock clear is called in parallel by multiple threads, synchronically waiting for the first thread's clear to complete seems to be a better strategy.
Resolves#3713
Copy file name to clipboardExpand all lines: fdb-record-layer-lucene/src/main/java/com/apple/foundationdb/record/lucene/directory/FDBDirectoryLockFactory.java
if (existingUuid != null && existingUuid.compareTo(selfStampUuid) == 0) {
219
223
// clear the lock if locked and matches uuid
220
224
aContext.ensureActive().clear(fileLockKey);
221
225
closingContext = aContext;
222
226
logSelf(isRecovery ? "FileLock: Cleared in Recovery path" : "FileLock: Cleared");
223
-
} elseif (!isRecovery) {
227
+
} elseif (!isRecovery) {
224
228
thrownewAlreadyClosedException("FileLock: Expected to be locked during close.This=" + this + " existingUuid=" + existingUuid); // The string append methods should handle null arguments.
225
229
}
226
-
}
227
-
});
230
+
});
228
231
229
-
if (agilityContext.isClosed()) {
230
-
// Here: this is considered to be a recovery path, may bypass closed context.
0 commit comments