We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a4d1b2 commit d8c1f1aCopy full SHA for d8c1f1a
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
@@ -1836,7 +1836,11 @@ void sendAddSuccessCallbacks() {
1836
return;
1837
}
1838
1839
- pendingAddOps.remove();
+ if (!pendingAddOps.remove(pendingAddOp)) {
1840
+ // If the remove operation fails, it means the element has already been removed by another thread.
1841
+ // We should continue to the next iteration to process the next element.
1842
+ continue;
1843
+ }
1844
explicitLacFlushPolicy.updatePiggyBackedLac(lastAddConfirmed);
1845
pendingAddsSequenceHead = pendingAddOp.entryId;
1846
if (!writeFlags.contains(WriteFlag.DEFERRED_SYNC)) {
0 commit comments