diff --git a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java index 651fa56deebeee7f2a2f201ea2b3b9d3be944921..810110eeb67237342e6005e46fdc29b8e3f6c65f 100644 --- a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java +++ b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java @@ -1404,9 +1404,7 @@ public class CommitLog { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } - if (hasNotified.compareAndSet(false, true)) { - waitPoint.countDown(); // notify - } + this.wakeup(); } private void swapRequests() { diff --git a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java index d3220d091d0b82a9a167a84089ee5dada193ff6e..a0e77fa3dc96ea0b5b23a405a2f0f05701d5b41d 100644 --- a/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java +++ b/store/src/main/java/org/apache/rocketmq/store/ha/HAService.java @@ -261,9 +261,7 @@ public class HAService { synchronized (this.requestsWrite) { this.requestsWrite.add(request); } - if (hasNotified.compareAndSet(false, true)) { - waitPoint.countDown(); // notify - } + this.wakeup(); } public void notifyTransferSome() {