deepthi912 opened a new pull request, #19748: URL: https://github.com/apache/pinot/pull/19748
## Keep a partially reverted segment tracked `revertSegmentUpsertMetadata()` reports a failed protected revert and then returns, so `removeSegment()` completes normally and reaches `untrackSegment()`. The segment is dropped even though its metadata is only partially reverted, and the RocksDB/map entries still pointing at it lose their only handle -- nothing can reconcile them afterwards, and `doTakeSnapshot()` no longer sees the segment. This rethrows after the `UPSERT_METADATA_REVERT_FAILED` log and the `UPSERT_METADATA_REVERT_FAILURES` meter, so the alerting added in #19505 stays and callers again observe the failure as they did before it. Note the `catch` is unreachable for the implementations in this repo: `ConcurrentMapPartitionUpsertMetadataManager` and `...ForConsistentDeletes` both handle revert failures per key and never throw. It only takes effect for downstream implementations of the abstract two-arg `removeSegment`. `testProtectedRevertFailuresAreReportedWithoutThrowing` is renamed to `...AndPropagated` and now asserts the segment stays tracked in every mode. The metric expectation is unchanged. ## Split keys-not-replaced by table type The non-partial branch of `updateInconsistentRowsMetric()` reported every table through `REALTIME_UPSERT_INCONSISTENT_ROWS`. That meter has a single call site, so it was already the non-partial counter under a generic name. `REALTIME_UPSERT_INCONSISTENT_ROWS` now covers `dropOutOfOrderRecord` tables, and the new `FULL_UPSERT_KEYS_NOT_REPLACED` covers the rest, reading symmetrically with `PARTIAL_UPSERT_KEYS_NOT_REPLACED`. Existing dashboards on `REALTIME_UPSERT_INCONSISTENT_ROWS` keep working for the table type that most often produces it. ## Testing `ConcurrentMapPartitionUpsertMetadataManagerTest` and `ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletesTest`: 53 tests, all passing. 🤖 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]
