You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org> on 2023/11/24 15:45:37 UTC
Re: [PR] [IOTDB-6257] Safely Delete IoT WAL with LastFlushedIndex To Support Kill -9 [iotdb]
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