You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "BUAAserein (via GitHub)" <gi...@apache.org> on 2023/11/24 07:06:40 UTC

[PR] [IOTDB-6257] Persist IoT Sync Index with LastFlushedIndex To Support Kill -9 [iotdb]

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

   see [jira](https://issues.apache.org/jira/browse/IOTDB-6257).


-- 
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] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]

Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@iotdb.apache.org

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


Re: [PR] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]

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


##########
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:
   Done.



##########
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:
   Done.



##########
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:
   Done.



-- 
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] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]

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


##########
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 or it will not be 0 even lag is 0



##########
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 or it will not be 0 even actual lag is 0



-- 
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] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]

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


##########
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:
   Done.



-- 
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] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]

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


-- 
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