You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2022/07/29 10:10:45 UTC
[iotdb] branch ml_0729_test updated: raw mode
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 6405f8096e raw mode
6405f8096e is described below
commit 6405f8096e1ee2478d73bc3b01bd8a18b10c3f32
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Fri Jul 29 18:10:35 2022 +0800
raw mode
---
.../db/consensus/statemachine/DataRegionStateMachine.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
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 0c8ea15444..40f378b24c 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
@@ -113,6 +113,10 @@ public class DataRegionStateMachine extends BaseStateMachine {
private InsertNode cacheAndGetLatestInsertNode(long syncIndex, InsertNode insertNode) {
synchronized (requestCache) {
requestCache.add(new InsertNodeWrapper(syncIndex, insertNode));
+ // while(!(requestCache.size() >= MAX_REQUEST_CACHE_SIZE &&
+ // requestCache.peek().getSyncIndex() == syncIndex)) {
+ // requestCache.wait();
+ // }
if (requestCache.size() >= MAX_REQUEST_CACHE_SIZE) {
return requestCache.poll().getInsertNode();
} else {
@@ -157,10 +161,10 @@ public class DataRegionStateMachine extends BaseStateMachine {
innerNode.setSearchIndex(indexedRequest.getSearchIndex());
insertNodes.add(innerNode);
}
- // planNode = mergeInsertNodes(insertNodes);
- planNode =
- cacheAndGetLatestInsertNode(
- indexedRequest.getSyncIndex(), mergeInsertNodes(insertNodes));
+ planNode = mergeInsertNodes(insertNodes);
+ // planNode =
+ // cacheAndGetLatestInsertNode(
+ // indexedRequest.getSyncIndex(), mergeInsertNodes(insertNodes));
// TODO: tmp way to do the test
if (planNode == null) {
return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());