Vamsi-klu opened a new pull request, #19401: URL: https://github.com/apache/pinot/pull/19401
Fixes #10237 ## Problem Deleting a realtime segment while one of its replicas is `CONSUMING` can leave the table without a valid consuming segment and interrupt ingestion. ## Solution Reject the full public delete batch with HTTP 400 when any target has a `CONSUMING` replica, and direct operators to pause the table before retrying. ## Why this approach Validation and IdealState removal run in one versioned Helix update, so a concurrent state change cannot slip between the check and deletion. Controller-owned lineage cleanup remains unchanged. ## Implementation - Added guarded IdealState removal and a typed rejection. - Batched sequence-number deletes across partitions to prevent partial deletion. - Added REST guidance and race, atomicity, bypass, and HTTP-contract coverage. ## Impact Realtime public deletes now fail safely and atomically. Offline deletes, table drops, lineage cleanup, and existing retention behavior are unchanged. Contract decision: this implementation is deny-only. Existing `force=true` does not bypass `CONSUMING` protection. Please confirm whether a separate `forceDeleteConsumingSegment` escape hatch is wanted. ## Test plan - `PinotHelixResourceManagerStatelessTest` — 28 passed - `PinotSegmentRestletResourceTest` — 9 passed - Spotless, Checkstyle, license checks, and `git diff --check` passed for `pinot-common` and `pinot-controller` ##### Was generative AI tooling used to co-author this PR? - [x] Yes -- 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]
