You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/09/29 07:11:27 UTC

[iotdb] branch master updated: Fix thrift access level

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 268de19348 Fix thrift access level
268de19348 is described below

commit 268de19348eca7fde9265c9f995765e45d1ea3a8
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Thu Sep 29 15:11:20 2022 +0800

    Fix thrift access level
---
 .../iotdb/consensus/ratis/SnapshotStorage.java     |  4 +---
 .../src/main/thrift/confignode.thrift              | 28 +++++++++++-----------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
index f91ab603f1..8571b5aa9a 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/ratis/SnapshotStorage.java
@@ -155,11 +155,9 @@ public class SnapshotStorage implements StateMachineStorage {
 
   @Override
   public SnapshotInfo getLatestSnapshot() {
-    SnapshotInfo latestSnapshot;
     snapshotCacheGuard.readLock().lock();
     try {
-      latestSnapshot = currentSnapshot;
-      return latestSnapshot;
+      return currentSnapshot;
     } finally {
       snapshotCacheGuard.readLock().unlock();
     }
diff --git a/thrift-confignode/src/main/thrift/confignode.thrift b/thrift-confignode/src/main/thrift/confignode.thrift
index 9d95e3d0de..94a651c79e 100644
--- a/thrift-confignode/src/main/thrift/confignode.thrift
+++ b/thrift-confignode/src/main/thrift/confignode.thrift
@@ -49,26 +49,26 @@ struct TGlobalConfig {
 }
 
 struct TRatisConfig {
-  1: optional i64 schemaAppenderBufferSize
-  2: optional i64 dataAppenderBufferSize
+  1: required i64 schemaAppenderBufferSize
+  2: required i64 dataAppenderBufferSize
 
-  3: optional i64 schemaSnapshotTriggerThreshold
-  4: optional i64 dataSnapshotTriggerThreshold
+  3: required i64 schemaSnapshotTriggerThreshold
+  4: required i64 dataSnapshotTriggerThreshold
 
-  5: optional bool schemaLogUnsafeFlushEnable
-  6: optional bool dataLogUnsafeFlushEnable
+  5: required bool schemaLogUnsafeFlushEnable
+  6: required bool dataLogUnsafeFlushEnable
 
-  7: optional i64 schemaLogSegmentSizeMax
-  8: optional i64 dataLogSegmentSizeMax
+  7: required i64 schemaLogSegmentSizeMax
+  8: required i64 dataLogSegmentSizeMax
 
-  9: optional i64 schemaGrpcFlowControlWindow
-  10: optional i64 dataGrpcFlowControlWindow
+  9: required i64 schemaGrpcFlowControlWindow
+  10: required i64 dataGrpcFlowControlWindow
 
-  11: optional i64 schemaLeaderElectionTimeoutMin
-  12: optional i64 dataLeaderElectionTimeoutMin
+  11: required i64 schemaLeaderElectionTimeoutMin
+  12: required i64 dataLeaderElectionTimeoutMin
 
-  13: optional i64 schemaLeaderElectionTimeoutMax
-  14: optional i64 dataLeaderElectionTimeoutMax
+  13: required i64 schemaLeaderElectionTimeoutMax
+  14: required i64 dataLeaderElectionTimeoutMax
 }
 
 struct TDataNodeRemoveReq {