This is an automated email from the ASF dual-hosted git repository.
vongosling pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 23bf87b fix issue #705 (#706)
23bf87b is described below
commit 23bf87bef6a9fde138353f9cca271b2813ba6b01
Author: chicc999 <[email protected]>
AuthorDate: Thu May 21 16:58:35 2020 +0800
fix issue #705 (#706)
---
.../main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/store/src/main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java
b/store/src/main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java
index 3483c99..75b7597 100644
--- a/store/src/main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java
+++ b/store/src/main/java/org/apache/rocketmq/store/ha/WaitNotifyObject.java
@@ -21,6 +21,7 @@ import org.apache.rocketmq.logging.InternalLogger;
import org.apache.rocketmq.logging.InternalLoggerFactory;
import java.util.HashMap;
+import java.util.Map;
public class WaitNotifyObject {
private static final InternalLogger log =
InternalLoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME);
@@ -65,9 +66,9 @@ public class WaitNotifyObject {
synchronized (this) {
boolean needNotify = false;
- for (Boolean value : this.waitingThreadTable.values()) {
- needNotify = needNotify || !value;
- value = true;
+ for (Map.Entry<Long,Boolean> entry :
this.waitingThreadTable.entrySet()) {
+ needNotify = needNotify || !entry.getValue();
+ entry.setValue(true);
}
if (needNotify) {