deepthi912 opened a new pull request, #19824:
URL: https://github.com/apache/pinot/pull/19824

   `shouldRevertMetadataOnInconsistency` now also requires the table to be 
non-pauseless.
   
   The revert restores each primary key to the location it held before the 
consuming segment claimed it. That location is recorded in `doAddRecord` only 
when it is an immutable segment:
   
   ```java
   if (_context.isTableTypeInconsistentDuringConsumption()
       && !(currentSegment instanceof MutableSegment)) {
     _previousKeyToRecordLocationMap.put(primaryKey, currentRecordLocation);
   }
   ```
   
   A pauseless table resolves to `ALLOW_DURING_BUILD_ONLY`, so the next segment 
consumes while the previous one is still mutable. Keys taken from that 
predecessor are never recorded — there is no stable location to record, since 
the mutable segment is offloaded and destroyed when it seals. A revert in that 
state restores the keys that came from older sealed segments and silently drops 
the rest.
   
   With this change those tables fall to the existing removal path, which 
reports the divergence through the inconsistent rows metric rather than leaving 
partially reverted metadata.
   
   Non-pauseless tables are unaffected: `validateConsumptionDuringUpsertRevert` 
already rejects `ALLOW_*` policies in PROTECTED mode, so they cannot have two 
live mutable segments.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to