OneSizeFitsQuorum commented on code in PR #11614:
URL: https://github.com/apache/iotdb/pull/11614#discussion_r1404477700


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java:
##########
@@ -233,6 +237,10 @@ public long getCurrentSyncIndex() {
       return controller.getCurrentIndex();
     }
 
+    public long getLastFlushedSyncIndex() {

Review Comment:
   getLastFlushedIndex



##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerMetrics.java:
##########
@@ -92,7 +92,7 @@ private void bindAutoGauge(AbstractMetricService 
metricService) {
         Metric.IOT_CONSENSUS.toString(),
         MetricLevel.IMPORTANT,
         impl,
-        IoTConsensusServerImpl::getCurrentSafelyDeletedSearchIndex,
+        IoTConsensusServerImpl::getMinFlushedIndex,

Review Comment:
   maybe we should monitor  minSyncIndex



##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/logdispatcher/LogDispatcher.java:
##########
@@ -344,7 +352,7 @@ public void updateSafelyDeletedSearchIndex() {
       // update safely deleted search index to delete outdated info,
       // indicating that insert nodes whose search index are before this value 
can be deleted
       // safely

Review Comment:
   Add a few comments on why minFlushedIndex is used here



##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/service/IoTConsensusRPCServiceProcessor.java:
##########
@@ -244,7 +244,7 @@ public void waitSyncLogComplete(
       return;
     }
     long searchIndex = impl.getSearchIndex();
-    long safeIndex = impl.getCurrentSafelyDeletedSearchIndex();
+    long safeIndex = impl.getMinFlushedIndex();

Review Comment:
   should not use flushedIndex here because the index maybe not be flushed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to