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

   `replaceDocId()` ends with 
`trackUpdatedSegmentsSinceLastSnapshot(oldSegment)` — the segment losing the 
doc. That is right while records move forward: the segment gaining one is then 
the consuming segment, and mutable segments are never snapshotted.
   
   A revert moves a doc the other way. `prevSegment` gains it and can be 
immutable, so it is the one whose validDocIds snapshot is now stale — but 
nothing marks it dirty, `doTakeSnapshot()` skips it as unchanged, and the next 
startup loads a file that still says the doc is invalid while the upsert 
metadata points at it. The row is silently missing.
   
   Adds `restoreDocId()` for that direction, used by both revert paths in 
`ConcurrentMapPartitionUpsertMetadataManager` and `...ForConsistentDeletes`.
   
   Kept separate from #19748 so it can be cherry-picked on its own.
   
   ## Testing
   
   `testRevertMarksRestoredSegmentForSnapshot` fails without the change 
(`expected [true] but found [false]`) and passes with it. 54 tests across 
`ConcurrentMapPartitionUpsertMetadataManagerTest` and 
`ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletesTest` pass.
   


-- 
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