You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Vamsi-klu (via GitHub)" <gi...@apache.org> on 2026/08/31 02:09:22 UTC
[PR] [controller] Reject deletion of consuming realtime segments [pinot]
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] [controller] Reject deletion of consuming realtime segments [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on PR #19401:
URL: https://github.com/apache/pinot/pull/19401#issuecomment-5626542950
Thanks for the contribution, but I've decided to not do this. This is a big behavior change, and could cause several clients to fail. I don't see much gain from disallowing consuming segment, as they can be easily recreated through realtime validation manager. Closing this PR
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] [controller] Reject deletion of consuming realtime segments [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed pull request #19401: [controller] Reject deletion of consuming realtime segments
URL: https://github.com/apache/pinot/pull/19401
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] [controller] Reject deletion of consuming realtime segments [pinot]
Posted by "Vamsi-klu (via GitHub)" <gi...@apache.org>.
Vamsi-klu commented on PR #19401:
URL: https://github.com/apache/pinot/pull/19401#issuecomment-5490305087
CI is green on 9a1b9c330ddc1673c1ab9a8d730a6b25a06fc1c4 (12/12), including Integration Test Set 2.
Public delete rejects CONSUMING realtime segments with HTTP 400. Upsert upload/preload tests now drop the table instead of deleting those segments one by one.
cc @Jackie-Jiang @mcvsubbu @sajjad-moradi
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] [controller] Reject deletion of consuming realtime segments [pinot]
Posted by "Vamsi-klu (via GitHub)" <gi...@apache.org>.
Vamsi-klu commented on PR #19401:
URL: https://github.com/apache/pinot/pull/19401#issuecomment-5489143479
CI is green on `9a1b9c330ddc1673c1ab9a8d730a6b25a06fc1c4` (12/12), including Integration Test Set 2.
Public delete now returns HTTP 400 when any target still has a CONSUMING replica. Pause the table first, or drop the table. Existing `force=true` does not bypass that check.
Rolling upgrade: no ZK, wire, or on-disk format change. Brokers and servers are unaffected. During a mixed-controller upgrade an old controller may still allow a CONSUMING delete; after every controller is upgraded the reject is cluster-wide. Rollback restores the old allow behavior.
cc @Jackie-Jiang @mcvsubbu @sajjad-moradi
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] [controller] Reject deletion of consuming realtime segments [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19401:
URL: https://github.com/apache/pinot/pull/19401#issuecomment-5473110324
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/19401?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `0%` with `12 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 57.68%. Comparing base ([`80dbb7d`](https://app.codecov.io/gh/apache/pinot/commit/80dbb7d02dfd92ccc20ae2606ac712ea4f73d3cf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0017efc`](https://app.codecov.io/gh/apache/pinot/commit/0017efc6cbc88f62df110b2d8db79ce5a56a7a7d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/19401?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...g/apache/pinot/common/utils/helix/HelixHelper.java](https://app.codecov.io/gh/apache/pinot/pull/19401?src=pr&el=tree&filepath=pinot-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcommon%2Futils%2Fhelix%2FHelixHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvaGVsaXgvSGVsaXhIZWxwZXIuamF2YQ==) | 0.00% | [12 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/19401?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (80dbb7d) and HEAD (0017efc). Click for more details.
>
> <details><summary>HEAD has 24 uploads less than BASE</summary>
>
>| Flag | BASE (80dbb7d) | HEAD (0017efc) |
>|------|------|------|
>|unittests|2|1|
>|java-25|6|1|
>|temurin|6|1|
>|lane-a|2|0|
>|integration|4|0|
>|integration1|2|0|
>|lane-b|2|0|
>|integration2|2|0|
>|unittests2|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #19401 +/- ##
============================================
- Coverage 67.56% 57.68% -9.88%
+ Complexity 1430 1 -1429
============================================
Files 3486 2683 -803
Lines 224173 163997 -60176
Branches 35381 26629 -8752
============================================
- Hits 151462 94603 -56859
- Misses 60684 61393 +709
+ Partials 12027 8001 -4026
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-25](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.68% <0.00%> (-9.88%)` | :arrow_down: |
| [lane-a](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [lane-b](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.68% <0.00%> (-9.88%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.68% <0.00%> (-9.88%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.68% <0.00%> (+0.01%)` | :arrow_up: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/19401/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/19401?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org