[ISSUE #10543] resolve data race in ServiceThread wakeup mechanism (#10544)

This commit is contained in:
SSpirits
2026-06-30 10:26:23 +08:00
committed by GitHub
parent f4c0c4d3a4
commit 88709c56aa
3 changed files with 242 additions and 48 deletions
@@ -1792,9 +1792,7 @@ public class CommitLog implements Swappable {
synchronized (this.requestsWrite) {
this.requestsWrite.add(request);
}
if (hasNotified.compareAndSet(false, true)) {
waitPoint.countDown(); // notify
}
this.wakeup();
boolean flag = this.requestsWrite.size() >
CommitLog.this.defaultMessageStore.getMessageStoreConfig().getMaxAsyncPutMessageRequests();
if (flag) {