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

Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 341b903121a Extract previous record locations size condition rather 
than counting (#19683)
341b903121a is described below

commit 341b903121aae1d40108730d5731b8fc7cfef8b9
Author: Chaitanya Deepthi <[email protected]>
AuthorDate: Fri Sep 25 23:43:50 2026 -0700

    Extract previous record locations size condition rather than counting 
(#19683)
---
 .../segment/local/upsert/BasePartitionUpsertMetadataManager.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
index c6795111a8f..2655bcbad22 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/BasePartitionUpsertMetadataManager.java
@@ -730,7 +730,7 @@ public abstract class BasePartitionUpsertMetadataManager 
implements PartitionUps
         segmentName);
     // Revert the keys in the segment to previous location and remove the 
newly added keys
     removeSegment(oldSegment, validDocIdsForOldSegment);
-    if (getPrevKeyToRecordLocationSize() == 0) {
+    if (!hasPrevKeyToRecordLocations()) {
       _logger.info("Successfully resolved inconsistency for segment: {} across 
servers", segmentName);
       return;
     }
@@ -1362,5 +1362,9 @@ public abstract class BasePartitionUpsertMetadataManager 
implements PartitionUps
 
   protected abstract int getPrevKeyToRecordLocationSize();
 
+  protected boolean hasPrevKeyToRecordLocations() {
+    return getPrevKeyToRecordLocationSize() > 0;
+  }
+
   protected abstract void clearPrevKeyToRecordLocation();
 }


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

Reply via email to