Remove APIs deprecated in 1.1.0 - #19141
Open
xiangfu0 wants to merge 1 commit into
Open
Conversation
- Remove deprecated SegmentName class (delegated to LLCSegmentName) and
LLCSegmentName.isLowLevelConsumerSegmentName
- Remove deprecated no-op TableConfigBuilder.setLLC and its test usage
- Remove deprecated JsonIgnore getters getReplicationNumber and
getReplicasPerPartitionNumber from SegmentsValidationAndRetentionConfig
- Remove deprecated ZNRecord-based ZKMetadataProvider.setTableConfig,
setRealtimeTableConfig and setOfflineTableConfig
- Remove deprecated PinotHelixResourceManager.getServersForSegment
- Remove deprecated MinionContext.getMinionMetrics/setMinionMetrics
(MinionMetrics.register already initializes the singleton)
- Remove deprecated validDocIds legacy read path: server endpoints
GET /segments/{table}/{segment}/validDocIds and
GET /tables/{table}/validDocIdMetadata, plus
ServerSegmentMetadataReader.getValidDocIdsFromServer; migrate tests to
the validDocIdsBitmap and POST validDocIdsMetadata replacements
- Remove dead SegmentCompletionProtocol.SegmentCommitEndRequest and MSG_TYPE_COMMIT_END (controller endpoint removed in apache#11662)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19141 +/- ##
============================================
- Coverage 65.62% 65.61% -0.02%
Complexity 1423 1423
============================================
Files 3439 3438 -1
Lines 218195 218130 -65
Branches 34669 34664 -5
============================================
- Hits 143198 143125 -73
- Misses 63443 63454 +11
+ Partials 11554 11551 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a set of long-deprecated (1.1.0-era) Pinot APIs and legacy server endpoints, primarily cleaning up remnants from the high-level-consumer removal and consolidating callers onto the supported equivalents.
Changes:
- Removed deprecated SPI/public APIs (e.g.,
TableConfigBuilder#setLLC,SegmentsValidationAndRetentionConfigreplication-number getters) and dead protocol constants/types. - Removed legacy server REST endpoints for validDocIds and updated server tests/callers to use
validDocIdsBitmapandvalidDocIdsMetadata. - Removed obsolete delegation utilities (
SegmentName,LLCSegmentName#isLowLevelConsumerSegmentName) and deprecated ZK table-config setters takingZNRecord.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pinot-spi/src/main/java/org/apache/pinot/spi/utils/builder/TableConfigBuilder.java | Drops deprecated setLLC(boolean) builder API. |
| pinot-spi/src/main/java/org/apache/pinot/spi/config/table/SegmentsValidationAndRetentionConfig.java | Removes deprecated replication-number getters (keeps serialization behavior unchanged). |
| pinot-server/src/test/java/org/apache/pinot/server/api/TablesResourceTest.java | Removes tests for deprecated validDocIds GET paths; validates bitmap + metadata POST endpoints. |
| pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java | Deletes deprecated validDocIds download + validDocIdMetadata GET endpoints; keeps supported replacements. |
| pinot-minion/src/main/java/org/apache/pinot/minion/MinionContext.java | Removes deprecated minion-metrics field and accessors from context. |
| pinot-minion/src/main/java/org/apache/pinot/minion/BaseMinionStarter.java | Stops wiring metrics through MinionContext (singleton registration remains). |
| pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManagerTest.java | Updates test config construction to no longer call removed TableConfigBuilder#setLLC. |
| pinot-controller/src/main/java/org/apache/pinot/controller/util/ServerSegmentMetadataReader.java | Removes legacy validDocIds fetch path and URL helper; keeps bitmap-based implementation. |
| pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java | Removes deprecated getServersForSegment delegate API. |
| pinot-common/src/main/java/org/apache/pinot/common/utils/SegmentName.java | Deletes deprecated delegating utility class. |
| pinot-common/src/main/java/org/apache/pinot/common/utils/LLCSegmentName.java | Removes deprecated isLowLevelConsumerSegmentName alias. |
| pinot-common/src/main/java/org/apache/pinot/common/protocols/SegmentCompletionProtocol.java | Removes dead commit-end message type and request class. |
| pinot-common/src/main/java/org/apache/pinot/common/metadata/ZKMetadataProvider.java | Removes deprecated ZNRecord-based table-config setters. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes APIs whose deprecations shipped in the 1.1.0 cycle (2023 H2 – early 2024), most of them follow-ups to the high-level-consumer removal. Part of a series of per-release deprecation sweeps.
All removed members were verified to have zero non-deprecated production callers. Full-reactor
test-compile,checkstyle:check, andlicense:checkpass.Removed
SegmentName(whole class — it only delegated toLLCSegmentName) andLLCSegmentName.isLowLevelConsumerSegmentName, whose only caller was that class.TableConfigBuilder.setLLC(boolean)— a no-op that only asserted its own argument wastrue.SegmentsValidationAndRetentionConfig.getReplicationNumber()/getReplicasPerPartitionNumber(). Both were@JsonIgnore, so table-config serialization is unchanged. The other deprecated members of this class are ZK-serialized and were deliberately left alone.ZKMetadataProviderZNRecord-basedsetTableConfig/setRealtimeTableConfig/setOfflineTableConfig. They only referenced each other; all production paths use the 2-argsetTableConfig(store, TableConfig).PinotHelixResourceManager.getServersForSegment(delegated togetServers).MinionContext.get/setMinionMetricsplus the_minionMetricsfield. Verified not load-bearing:BaseMinionStarteralready callsMinionMetrics.register(...)on the preceding line, andMinionMetrics.get()reads the singleton thatregistersets.ServerSegmentMetadataReader.getValidDocIdsFromServerand its private URL helper, plus the server endpointsGET /segments/{table}/{segment}/validDocIdsandGET /tables/{table}/validDocIdMetadata. Replacements (GET .../validDocIdsBitmap,POST .../validDocIdsMetadata) are untouched and have been in use since 1.2.SegmentCompletionProtocol.SegmentCommitEndRequestandMSG_TYPE_COMMIT_END. Dead since Remove the old deprecated commit end without metadata #11662 removed the controller handler for plainsegmentCommitEnd; onlysegmentCommitEndWithMetadataremains. Note these two were never annotated@Deprecated— they are dead-code residue removed alongside their release-line neighbours.Mixed-version safety was checked against
release-1.5.1: no component in the latest release calls any removed endpoint or method.backward-incompat
Please apply the
backward-incompatlabel.The two removed server REST endpoints are the notable part: they were Swagger-documented and reachable by external tooling (operator scripts, third-party upsert-compaction drivers), which will now get 404s. Replacements:
GET /segments/{table}/{segment}/validDocIds→GET /segments/{table}/{segment}/validDocIdsBitmapGET /tables/{table}/validDocIdMetadata→POST /tables/{table}/validDocIdsMetadataThe removed
pinot-spimethods (setLLC,getReplicationNumber,getReplicasPerPartitionNumber) are source-breaking for out-of-tree code.