Skip to content

Remove APIs deprecated in 1.1.0 - #19141

Open
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.1
Open

Remove APIs deprecated in 1.1.0#19141
xiangfu0 wants to merge 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.1

Conversation

@xiangfu0

@xiangfu0 xiangfu0 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

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, and license:check pass.

Removed

  • SegmentName (whole class — it only delegated to LLCSegmentName) and LLCSegmentName.isLowLevelConsumerSegmentName, whose only caller was that class.
  • TableConfigBuilder.setLLC(boolean) — a no-op that only asserted its own argument was true.
  • 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.
  • ZKMetadataProvider ZNRecord-based setTableConfig / setRealtimeTableConfig / setOfflineTableConfig. They only referenced each other; all production paths use the 2-arg setTableConfig(store, TableConfig).
  • PinotHelixResourceManager.getServersForSegment (delegated to getServers).
  • MinionContext.get/setMinionMetrics plus the _minionMetrics field. Verified not load-bearing: BaseMinionStarter already calls MinionMetrics.register(...) on the preceding line, and MinionMetrics.get() reads the singleton that register sets.
  • Legacy validDocIds read path: ServerSegmentMetadataReader.getValidDocIdsFromServer and its private URL helper, plus the server endpoints GET /segments/{table}/{segment}/validDocIds and GET /tables/{table}/validDocIdMetadata. Replacements (GET .../validDocIdsBitmap, POST .../validDocIdsMetadata) are untouched and have been in use since 1.2.
  • SegmentCompletionProtocol.SegmentCommitEndRequest and MSG_TYPE_COMMIT_END. Dead since Remove the old deprecated commit end without metadata #11662 removed the controller handler for plain segmentCommitEnd; only segmentCommitEndWithMetadata remains. 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-incompat label.

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}/validDocIdsGET /segments/{table}/{segment}/validDocIdsBitmap
  • GET /tables/{table}/validDocIdMetadataPOST /tables/{table}/validDocIdsMetadata

The removed pinot-spi methods (setLLC, getReplicationNumber, getReplicasPerPartitionNumber) are source-breaking for out-of-tree code.

- 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)
@xiangfu0 xiangfu0 added the backward-incompat Introduces a backward-incompatible API or behavior change label Aug 1, 2026
@codecov-commenter

codecov-commenter commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.61%. Comparing base (dc95530) to head (eed65f1).

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     
Flag Coverage Δ
custom-integration1 ?
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 65.61% <ø> (-0.02%) ⬇️
temurin 65.61% <ø> (-0.02%) ⬇️
unittests 65.61% <ø> (-0.02%) ⬇️
unittests1 56.98% <ø> (-0.03%) ⬇️
unittests2 37.96% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, SegmentsValidationAndRetentionConfig replication-number getters) and dead protocol constants/types.
  • Removed legacy server REST endpoints for validDocIds and updated server tests/callers to use validDocIdsBitmap and validDocIdsMetadata.
  • Removed obsolete delegation utilities (SegmentName, LLCSegmentName#isLowLevelConsumerSegmentName) and deprecated ZK table-config setters taking ZNRecord.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backward-incompat Introduces a backward-incompatible API or behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants