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

caiconghui pushed a commit to branch tablet_index
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/tablet_index by this push:
     new 25ae82a223b fix
25ae82a223b is described below

commit 25ae82a223bc9015ab0b8ca8ff5c453a5331c938
Author: caiconghui1 <[email protected]>
AuthorDate: Wed Nov 8 23:09:16 2023 +0800

    fix
---
 .../java/org/apache/doris/planner/TabletLoadIndexRecorderMgr.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/planner/TabletLoadIndexRecorderMgr.java
 
b/fe/fe-core/src/main/java/org/apache/doris/planner/TabletLoadIndexRecorderMgr.java
index 6302017551b..3b14445653d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/planner/TabletLoadIndexRecorderMgr.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/planner/TabletLoadIndexRecorderMgr.java
@@ -77,9 +77,9 @@ public class TabletLoadIndexRecorderMgr extends MasterDaemon {
             int tabletLoadIndex = loadIndex % numBuckets;
             loadIndex++;
             // To reduce the compute time cost, only update timestamp when 
load index is
-            // larger than TIMES_FOR_UPDATE_TIMESTAMP
-            if (loadIndex >= TIMES_FOR_UPDATE_TIMESTAMP) {
-                loadIndex = loadIndex - TIMES_FOR_UPDATE_TIMESTAMP;
+            // greater than or equal to both TIMES_FOR_UPDATE_TIMESTAMP and 
numBuckets
+            if (loadIndex >= Math.max(TIMES_FOR_UPDATE_TIMESTAMP, numBuckets)) 
{
+                loadIndex = loadIndex % numBuckets;
                 this.updateTimestamp = System.currentTimeMillis();
             }
             return tabletLoadIndex;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to