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

[iotdb] 02/02: spotless

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

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

commit df6ec6ccc52eb678e39bb585bdbac022963a03fb
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Wed Sep 14 14:35:13 2022 +0800

    spotless
---
 .../iotdb/consensus/multileader/logdispatcher/LogDispatcher.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
index 70b419af03..014528ec8f 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/LogDispatcher.java
@@ -223,11 +223,10 @@ public class LogDispatcher {
       // update safely deleted search index to delete outdated info,
       // indicating that insert nodes whose search index are before this value can be deleted
       // safely
-      long currentSafelyDeletedSearchIndex =
-          impl.getCurrentSafelyDeletedSearchIndex()
-              / config.getReplication().getCheckpointGap()
-              * config.getReplication().getCheckpointGap();
-      reader.setSafelyDeletedSearchIndex(currentSafelyDeletedSearchIndex);
+      long currentSafelyDeletedSearchIndex = impl.getCurrentSafelyDeletedSearchIndex();
+      reader.setSafelyDeletedSearchIndex(
+          currentSafelyDeletedSearchIndex
+              - currentSafelyDeletedSearchIndex % config.getReplication().getCheckpointGap());
       // notify
       if (impl.unblockWrite()) {
         impl.signal();