You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Pengzna (via GitHub)" <gi...@apache.org> on 2024/09/07 09:53:36 UTC

[PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Pengzna opened a new pull request, #13440:
URL: https://github.com/apache/iotdb/pull/13440

   as title.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768279097


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,6 +154,7 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2

Review Comment:
   Ratis?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768171541


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   @OneSizeFitsQuorum Theoretically, we can. Because regardless of the mode, the receiving end is the same, only the form of sending data is different



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1764497059


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
 # effectiveMode: first_start
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1764497726


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java:
##########
@@ -53,6 +53,7 @@ public class SystemPropertiesUtils {
   private static final String TIMESTAMP_PRECISION = "timestamp_precision";
   private static final String CN_CONSENSUS_PROTOCOL = "config_node_consensus_protocol_class";
   private static final String DATA_CONSENSUS_PROTOCOL = "data_region_consensus_protocol_class";
+  private static final String IOT_CONSENSUS_V2_MODE = "iot_consensus_v2_mode";

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768171541


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   @OneSizeFitsQuorum Theoretically, we can. But configuration for users may comfusable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum merged PR #13440:
URL: https://github.com/apache/iotdb/pull/13440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1764496411


##########
iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift:
##########
@@ -37,11 +37,12 @@ struct TGlobalConfig {
   5: required i64 timePartitionInterval
   6: required string readConsistencyLevel
   7: required double diskSpaceWarningThreshold
-  8: optional string timestampPrecision
-  9: optional string schemaEngineMode
-  10: optional i32 tagAttributeTotalSize
-  11: optional bool isEnterprise
-  12: optional i64 timePartitionOrigin
+  8: optional string iotConsensusV2Mode

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1764498481


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/config/PipeConsensusConfig.java:
##########
@@ -34,9 +34,10 @@ public class PipeConsensusConfig {
   // Use stream mode by default. User can configure it
   private ReplicateMode replicateMode = ReplicateMode.STREAM;
 
-  public PipeConsensusConfig(RPC rpc, Pipe pipe) {
+  public PipeConsensusConfig(RPC rpc, Pipe pipe, ReplicateMode replicateMode) {
     this.rpc = rpc;
     this.pipe = pipe;
+    this.replicateMode = replicateMode;
   }
 
   public void setReplicateMode(ReplicateMode replicateMode) {

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768174308


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768244638


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java:
##########
@@ -1126,16 +1126,18 @@ private void loadIoTConsensusProps(Properties properties) throws IOException {
                 .trim()));
   }
 
-  private void loadPipeConsensusProps(Properties properties) throws IOException {
-    conf.setPipeConsensusPipelineSize(
+  private void loadIoTConsensusV2Props(Properties properties) throws IOException {
+    conf.setIotConsensusV2PipelineSize(
         Integer.parseInt(
             properties.getProperty(
-                "fast_iot_consensus_pipeline_size",
+                "iot_consensus_v2_pipeline_size",
                 ConfigurationFileUtils.getConfigurationDefaultValue(
-                    "fast_iot_consensus_pipeline_size"))));
-    if (conf.getPipeConsensusPipelineSize() <= 0) {
-      conf.setPipeConsensusPipelineSize(5);
+                    "iot_consensus_v2_pipeline_size"))));
+    if (conf.getIotConsensusV2PipelineSize() <= 0) {
+      conf.setIotConsensusV2PipelineSize(5);
     }
+    conf.setIotConsensusV2Mode(

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "VGalaxies (via GitHub)" <gi...@apache.org>.
VGalaxies commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1770730656


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/config/PipeConsensusConfig.java:
##########
@@ -32,14 +32,11 @@ public class PipeConsensusConfig {
   private final RPC rpc;
   private final Pipe pipe;
   // Use stream mode by default. User can configure it

Review Comment:
   remove outdated comment



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1759724874


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/config/PipeConsensusConfig.java:
##########
@@ -34,9 +34,10 @@ public class PipeConsensusConfig {
   // Use stream mode by default. User can configure it
   private ReplicateMode replicateMode = ReplicateMode.STREAM;
 
-  public PipeConsensusConfig(RPC rpc, Pipe pipe) {
+  public PipeConsensusConfig(RPC rpc, Pipe pipe, ReplicateMode replicateMode) {
     this.rpc = rpc;
     this.pipe = pipe;
+    this.replicateMode = replicateMode;
   }
 
   public void setReplicateMode(ReplicateMode replicateMode) {

Review Comment:
   Do we still need this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1770785033


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/config/PipeConsensusConfig.java:
##########
@@ -32,14 +32,11 @@ public class PipeConsensusConfig {
   private final RPC rpc;
   private final Pipe pipe;
   // Use stream mode by default. User can configure it

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768173822


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768169183


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -1804,12 +1814,12 @@ schema_region_ratis_periodic_snapshot_interval=86400
 data_region_ratis_periodic_snapshot_interval=86400
 
 ####################
-### Fast IoTConsensus Configuration
+### IoTConsensusV2 Configuration
 ####################
 # Default event buffer size for connector and receiver in pipe consensus

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1764698121


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart

Review Comment:
   first_start



##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.

Review Comment:
   remove this line?



##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -1804,12 +1814,12 @@ schema_region_ratis_periodic_snapshot_interval=86400
 data_region_ratis_periodic_snapshot_interval=86400
 
 ####################
-### Fast IoTConsensus Configuration
+### IoTConsensusV2 Configuration
 ####################
 # Default event buffer size for connector and receiver in pipe consensus

Review Comment:
   remove pipeconsensus



##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   restart?
   BTW, Should we allow some nodes to stream and some nodes to batch? @SteveYurongSu 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768171541


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
-# effectiveMode: first_start
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
+# effectiveMode: restart
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   @OneSizeFitsQuorum Theoretically, we can.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1768224490


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java:
##########
@@ -1126,16 +1126,18 @@ private void loadIoTConsensusProps(Properties properties) throws IOException {
                 .trim()));
   }
 
-  private void loadPipeConsensusProps(Properties properties) throws IOException {
-    conf.setPipeConsensusPipelineSize(
+  private void loadIoTConsensusV2Props(Properties properties) throws IOException {
+    conf.setIotConsensusV2PipelineSize(
         Integer.parseInt(
             properties.getProperty(
-                "fast_iot_consensus_pipeline_size",
+                "iot_consensus_v2_pipeline_size",
                 ConfigurationFileUtils.getConfigurationDefaultValue(
-                    "fast_iot_consensus_pipeline_size"))));
-    if (conf.getPipeConsensusPipelineSize() <= 0) {
-      conf.setPipeConsensusPipelineSize(5);
+                    "iot_consensus_v2_pipeline_size"))));
+    if (conf.getIotConsensusV2PipelineSize() <= 0) {
+      conf.setIotConsensusV2PipelineSize(5);
     }
+    conf.setIotConsensusV2Mode(

Review Comment:
   try to use ConfigurationFileUtils.getConfigurationDefaultValue(



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "Pengzna (via GitHub)" <gi...@apache.org>.
Pengzna commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1769503179


##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,6 +154,7 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IoTConsensusV2: Introduce IoTConsensusV2 and corresponding mode option [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #13440:
URL: https://github.com/apache/iotdb/pull/13440#discussion_r1759718756


##########
iotdb-protocol/thrift-confignode/src/main/thrift/confignode.thrift:
##########
@@ -37,11 +37,12 @@ struct TGlobalConfig {
   5: required i64 timePartitionInterval
   6: required string readConsistencyLevel
   7: required double diskSpaceWarningThreshold
-  8: optional string timestampPrecision
-  9: optional string schemaEngineMode
-  10: optional i32 tagAttributeTotalSize
-  11: optional bool isEnterprise
-  12: optional i64 timePartitionOrigin
+  8: optional string iotConsensusV2Mode

Review Comment:
   Please use 13 considering compatibility



##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/conf/SystemPropertiesUtils.java:
##########
@@ -53,6 +53,7 @@ public class SystemPropertiesUtils {
   private static final String TIMESTAMP_PRECISION = "timestamp_precision";
   private static final String CN_CONSENSUS_PROTOCOL = "config_node_consensus_protocol_class";
   private static final String DATA_CONSENSUS_PROTOCOL = "data_region_consensus_protocol_class";
+  private static final String IOT_CONSENSUS_V2_MODE = "iot_consensus_v2_mode";

Review Comment:
   this should be allowed to modify?



##########
iotdb-core/node-commons/src/assembly/resources/conf/iotdb-system.properties.template:
##########
@@ -154,10 +154,20 @@ data_replication_factor=1
 # 1. org.apache.iotdb.consensus.simple.SimpleConsensus   (The data_replication_factor can only be set to 1)
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 4. org.apache.iotdb.consensus.ratis.IoTConsensusV2
 # effectiveMode: first_start
 # Datatype: string
 data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
+# IoTConsensusV2 mode.
+# This parameter is unmodifiable after ConfigNode starts for the first time.
+# These consensus protocol modes are currently supported:
+# 1. batch
+# 2. stream
+# effectiveMode: first_start

Review Comment:
   restart?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org