-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add ignoreMissingSegments query option and broker auto-config #16556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ignoreMissingSegments query option and broker auto-config #16556
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #16556 +/- ##
=========================================
Coverage ? 63.31%
Complexity ? 1379
=========================================
Files ? 3027
Lines ? 176446
Branches ? 27074
=========================================
Hits ? 111717
Misses ? 56164
Partials ? 8565
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Addressed Codecov by adding a streaming reduce unit test to verify ignoreMissingSegments filtering in gRPC path. Also fixed the test to use a selection query per StreamingReduceService (selection-only). |
|
Addressed review feedback: simplified broker config check in BaseSingleStageBrokerRequestHandler and extracted a helper to avoid duplication. No functional changes. |
a336bda to
3ed8d9f
Compare
pinot-core/src/test/java/org/apache/pinot/core/query/reduce/StreamingReduceServiceTest.java
Outdated
Show resolved
Hide resolved
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a config pinot.server.instance.table.deleted.segments.cache.ttl.minutes to control how long to keep the deleted segments (not count them as missing). See BaseTableDataManager._recentlyDeletedSegments for more details.
Do you still see this new option necessary?
The caveat for _recentlyDeletedSegments cache is the server may still restart and clear the cache. |
c0bdb98 to
0172726
Compare
…fig; skip SERVER_SEGMENT_MISSING errors when enabled; add SSE/MSE wiring and unit tests
0172726 to
32b9441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new query option ignoreMissingSegments and corresponding broker configuration to handle transient segment availability issues. The feature allows queries to continue executing when segments are temporarily missing due to routing table lag after segment deletion.
- Adds
ignoreMissingSegmentsquery option to filter outSERVER_SEGMENT_MISSINGexceptions - Introduces broker configuration
pinot.broker.query.ignore.missing.segmentsto automatically enable the option - Implements filtering logic in both single-stage and multi-stage query execution paths
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CommonConstants.java | Defines new broker config and query option constants |
| QueryOptionsUtils.java | Adds utility method to parse the new query option |
| QueryOptionsUtilsTest.java | Tests for the new query option parsing logic |
| ServerQueryExecutorV1Impl.java | Server-side logic to skip populating missing segment exceptions when option is set |
| BrokerReduceService.java | Broker-side filtering of missing segment exceptions for single-stage queries |
| StreamingReduceService.java | Broker-side filtering of missing segment exceptions for streaming queries |
| BaseSingleStageBrokerRequestHandler.java | Auto-configuration of the query option based on broker settings |
| MultiStageBrokerRequestHandler.java | Auto-configuration and missing segment handling for multi-stage queries |
| BrokerReduceServiceTest.java | Tests verifying exception filtering behavior |
| StreamingReduceServiceTest.java | Tests for streaming query exception filtering |
| QueryExecutorExceptionsTest.java | Server-side tests for the ignore option behavior |
Comments suppressed due to low confidence (1)
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:463
- Unused variable
tableNamesshould be removed as it's assigned but never used in this method.
() -> query.explain(requestId, fragmentToPlanNode), timer);
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@Jackie-Jiang , do you know how transient these failures typically are? how did you learn/what motivated this PR? |
For large table with many segments(especially table with many kafka partitions and high retention frequency), the routing table rebuild may take longer time like couple minutes. Then queries to those servers will fail find segments. E.g. |
This PR introduces a query option:
ignoreMissingSegmentsto ignore server-side missing segment errors and an optional broker dynamic config (pinot.broker.query.ignore.missing.segments) to set it automatically.Key changes:
This alleviates transient failures when a segment is deleted but the routing table is not yet updated.