Remove APIs deprecated in 1.0.0 - #19140
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19140 +/- ##
=========================================
Coverage 65.62% 65.63%
Complexity 1423 1423
=========================================
Files 3439 3439
Lines 218195 218230 +35
Branches 34669 34679 +10
=========================================
+ Hits 143198 143237 +39
- Misses 63443 63446 +3
+ Partials 11554 11547 -7
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:
|
There was a problem hiding this comment.
Pull request overview
Removes long-deprecated APIs (from the 1.0.0 deprecation cycle) across core/controller code and updates the Java admin client to use the non-deprecated segments listing endpoint, aligning client behavior with controller semantics while keeping the deprecated controller endpoint for existing deployed clients.
Changes:
- Removed deprecated
OnHeapGuavaBloomFilterCreator4-arg constructor and deprecatedPinotHelixResourceManagerschema methods. - Cleaned up stale “Deprecated APIs” class Javadoc in
PinotSegmentRestletResource. - Repointed
SegmentAdminClient.selectSegmentsfromGET /segments/{tableName}/selecttoGET /segments/{tableName}and updated the unit test accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/bloom/OnHeapGuavaBloomFilterCreator.java | Removes deprecated compatibility constructor. |
| pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java | Removes deprecated schema APIs (deleteSchema(Schema), getSchemaForTableConfig). |
| pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java | Removes stale Javadoc section listing deprecated endpoints that no longer exist. |
| pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/admin/SegmentAdminClient.java | Switches selectSegments to call the non-deprecated /segments/{tableName} endpoint. |
| pinot-clients/pinot-java-client/src/test/java/org/apache/pinot/client/admin/PinotAdminClientTest.java | Updates verification to assert the new /segments/{tableName} request path. |
|
One of these looks like it's in the wrong bucket: At /**
* Find schema with same name as rawTableName. If not found, find schema using schemaName in validationConfig.
* For OFFLINE table, it is possible that schema was not uploaded before creating the table. Hence for OFFLINE,
* this method can return null.
*/
@Nullable
public Schema getSchemaForTableConfig(TableConfig tableConfig) {
So it's carried the annotation through 1.4.0, 1.5.0 and 1.5.1 — real runway, and there are no remaining callers, so no objection to removing it. But it's a shorter window than the "1.0.0" heading implies, and anyone later auditing when a given API was deprecated would get the wrong answer from the PR title. Might be worth moving it to a 1.4.0-era PR, or just calling it out separately in the release notes. Everything else in this PR checks out as |
Sunsets deprecated APIs whose deprecations shipped in the 1.0.0 cycle (2023 H1). All removed members had zero non-deprecated production callers. - OnHeapGuavaBloomFilterCreator: remove the 4-arg constructor; its own TODO named apache#10184 as the exit criteria, which has long since merged - PinotHelixResourceManager: remove deleteSchema(Schema), which also returned false on its success path - PinotHelixResourceManager: remove getSchemaForTableConfig(TableConfig). Note this one is NOT a 1.0.0-era deprecation - it was deprecated in 1.4.0 by apache#15333 (Mar 2025), when schema became mandatory for all tables. It is included here rather than held for a 1.4.0 sweep because it has carried the annotation through 1.4.0, 1.5.0 and 1.5.1 and has no remaining callers - PinotSegmentRestletResource: drop the stale "Deprecated APIs" section from the class javadoc; none of the endpoints it listed still exist Also repoints SegmentAdminClient.selectSegments from the deprecated "GET /segments/{tableName}/select" to "GET /segments/{tableName}". The deprecated endpoint is retained this release so that already-shipped 1.5.x and 1.6.x clients keep working against an upgraded controller; it can be deleted once those clients have had a release to migrate. Two behavior changes follow from the repoint, both of which make the client match its documented contract: - selectSegments(..., excludeReplacedSegments=false) now returns replaced segments. The old endpoint ignored the flag and always excluded them. - The database header is now honored for segment selection, consistent with the other /segments endpoints.
6156ed0 to
e033693
Compare
|
@yashmayya good catch, you're right and I've confirmed it independently.
Worth naming the root cause, because it could have hidden more than one error: I dated each group by git-blaming a single representative line and assuming its neighbours shared that vintage. Here I blamed So I re-ran the check properly across the whole series: for every member removed in all five PRs, does it carry I've kept the removal here and called the real vintage out explicitly in the commit message, taking your "call it out separately" option — it's carried the annotation through 1.4.0, 1.5.0 and 1.5.1 and has no remaining callers. Happy to pull it out and hold it for a 1.4.0 sweep instead if you'd rather the buckets stay strictly clean; just say the word. Separately, note the |
Documents the upgrade impact of apache/pinot#19140: SegmentAdminClient endpoint migration, newly honored replaced-segment and database filters, and removed extension APIs. Validation: git diff --check. Co-authored-by: Xiang Fu <xiangfu@xiangs-macbook-pro-1.wyvern-sun.ts.net>
|
Documentation follow-up: pinot-contrib/pinot-docs#956 |
Part of #19147.
Removes APIs whose deprecations shipped in the 1.0.0 cycle (2023 H1). 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
OnHeapGuavaBloomFilterCreator4-arg constructor. Its own TODO named Complete index spi #10184 as the exit criteria, which merged long ago. Both remaining call sites already use the 5-arg form.PinotHelixResourceManager.deleteSchema(Schema)— also returnedfalseon its success path. Every remainingdeleteSchemacall site passes aString.PinotHelixResourceManager.getSchemaForTableConfig(TableConfig)— see the correction below; this one is a 1.4.0-era deprecation, not 1.0.0.PinotSegmentRestletResource: a "Deprecated APIs" section listing five/tables/{tableName}/segments*endpoints that no longer exist anywhere in the codebase.Staged:
/segments/{tableName}/selectSegmentAdminClient.selectSegmentsis repointed from the deprecatedGET /segments/{tableName}/selecttoGET /segments/{tableName}, which is an exact functional superset (same response shapeList<Map<TableType, List<String>>>, same timestamp parsing and validation, equivalent authorization — both resolve to actionGetSegmentwithTargetType.TABLE).The deprecated endpoint is intentionally retained in this PR.
pinot-java-clienthas been shipping aselectSegmentsthat calls/selectthroughout the 1.5.x and 1.6.x train; since controllers upgrade before client fleets, deleting it now would 404 every already-deployed client. It can be deleted once this client migration has had a release to propagate.Two behavior changes worth calling out
Both make the client match its own documented contract, but they are observable:
selectSegments(..., excludeReplacedSegments=false)now returns replaced segments. The old/selectendpoint never read that query parameter — it hardcodedgetSegmentsFor(tableNameWithType, true, ...)— so the flag the client had always been sending was silently ignored and replaced segments were always excluded. The new endpoint honors it. Callers passingfalsewill see a larger result set. The only in-repo caller (LaunchBackfillIngestionJobCommand) passestrueand is unaffected.databaseheader is now honored for segment selection, consistent with every other/segments/*endpoint./selectignored it.Correction: one item is in the wrong release bucket
Thanks to @yashmayya for catching this.
getSchemaForTableConfigwas not deprecated in 1.0.0 — it was still a live method with real fallback logic atrelease-1.3.0, and@Deprecatedfirst appears atrelease-1.4.0, added by #15333 (Mar 2025) when schema became mandatory for all tables.I re-verified against the tags and confirm his reading:
I then re-ran the same check against every member removed across all five PRs in this series (does it carry
@Deprecatedatrelease-1.3.0?) — this is the only one that was mis-bucketed. The root cause was my own method: I dated each group by git-blaming one representative line and assumed neighbouring members shared its vintage, which is exactly wrong for a method deprecated two years after its neighbour.I've kept the removal here and called it out explicitly in the commit message rather than moving it, since it still has genuine runway (1.4.0, 1.5.0, 1.5.1) and no remaining callers — but say the word if you'd rather I pull it out and hold it for a 1.4.0 sweep.
Not removed
POST /instances/{instanceName}/statewas in the original sweep list but stays:InstanceAdminClient.setInstanceStateis a live non-deprecated caller, and the POST handler supports adropoperation the replacement PUT handler does not.backward-incompat
Please apply the
backward-incompatlabel. The removedPinotHelixResourceManagermethods are source-breaking for controller plugins, and the removed bloom-filter constructor is source-breaking for out-of-tree index code. Release note should carry the twoselectSegmentsbehavior changes above.