This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch ml_0729_test
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/ml_0729_test by this push:
new c0e5e9086e fix the error when using condition
c0e5e9086e is described below
commit c0e5e9086e1fa87174858fd1ad9fa35bf5c31ed3
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Fri Jul 29 18:56:11 2022 +0800
fix the error when using condition
---
.../apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
index 852f421b33..7117e04509 100644
---
a/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
+++
b/server/src/main/java/org/apache/iotdb/db/consensus/statemachine/DataRegionStateMachine.java
@@ -121,6 +121,7 @@ public class DataRegionStateMachine extends
BaseStateMachine {
lock.lock();
try {
requestCache.add(new InsertNodeWrapper(syncIndex, insertNode));
+ cacheCondition.signalAll();
while (!(requestCache.size() >= MAX_REQUEST_CACHE_SIZE
&& requestCache.peek().getSyncIndex() == syncIndex)) {
try {
@@ -133,7 +134,7 @@ public class DataRegionStateMachine extends
BaseStateMachine {
Thread.currentThread().interrupt();
}
}
- cacheCondition.notifyAll();
+ cacheCondition.signalAll();
return requestCache.poll().getInsertNode();
} finally {
lock.unlock();