Skip to content

Remove APIs deprecated in 1.2.0 - #19142

Merged
xiangfu0 merged 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.2
Aug 2, 2026
Merged

Remove APIs deprecated in 1.2.0#19142
xiangfu0 merged 1 commit into
apache:masterfrom
xiangfu0:xiangfu0/remove-deprecated-1.2

Conversation

@xiangfu0

@xiangfu0 xiangfu0 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Part of #19147.

Removes APIs whose deprecations shipped in the 1.2.0 cycle (2024). 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. No test changes were needed — nothing referenced any removed API.

Removed

  • GET /tables/{tableName}/livebrokers (singular). The plural GET /tables/livebrokers remains. Note the two return different shapes, so external callers of the singular form need more than a path change — see below.
  • RequestUtils.getFunctionExpression(String) and getOptionsFromJson(JsonNode, String). Both had zero callers; the non-deprecated getFunctionExpression(Function) overload is untouched and still used by ClpRewriter.
  • BrokerResponse.getProcessingExceptions() — a @JsonIgnore default method with no callers, so the broker JSON response shape is unchanged. (The same-named methods on RequestContext are an unrelated interface and are untouched.)

Deliberately excluded

Two items from the original sweep were dropped after investigation:

POST /segments/{tableName}/delete — removing this requires migrating SegmentAdminClient to DELETE /segments/{tableName} first, and that migration turned out to be unsafe in two independent ways: the DELETE endpoint treats a missing segments parameter as "delete every segment in the table" (so an empty list silently escalates from a 400 into whole-table deletion), and its @QueryParam("segments") List<String> binding only populates from repeated segments=a&segments=b parameters, so a comma-joined value arrives as one bogus segment name and silently no-ops. Both bugs appear to exist in the current client's DELETE path independently of this PR and deserve their own fix.

SegmentLocks static factories — ConcurrentMapPartitionUpsertMetadataManagerForConsistentDeletes still calls the deprecated static getSegmentLock. Migrating it to the instance method would change lock scoping from a global static cache to per-TableDataManager locks, which is a concurrency-semantics change that does not belong in a deprecation sweep.

TableAndSchemaConfig was also left in place: it is still the request-body DTO of PinotUpsertRestletResource, and its JSON shape ({tableConfig, schema}) differs from TableConfigs ({tableName, schema, offline, realtime}), so swapping it would break the public REST contract.

backward-incompat

Please apply the backward-incompat label.

The removed GET /tables/{tableName}/livebrokers endpoint 404s for external clients after upgrade, and the replacement is not a drop-in: GET /tables/livebrokers returns Map<String, List<InstanceInfo>> rather than the singular endpoint's List<String>. The removed RequestUtils public statics are source-breaking for out-of-tree code compiled against pinot-common.

- Remove deprecated controller endpoint GET /tables/{tableName}/livebrokers
  (PinotTableInstances); the plural GET /tables/livebrokers?tables=...
  endpoint remains.
- Remove deprecated RequestUtils.getFunctionExpression(String) (no-operand
  variant); all callers already use the Function or name+operands overloads.
- Remove deprecated RequestUtils.getOptionsFromJson(JsonNode, String);
  no callers.
- Remove deprecated BrokerResponse.getProcessingExceptions() default method;
  use getExceptions() instead.
@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 (4b44cca).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19142      +/-   ##
============================================
- Coverage     65.62%   65.61%   -0.02%     
  Complexity     1423     1423              
============================================
  Files          3439     3439              
  Lines        218195   218184      -11     
  Branches      34669    34669              
============================================
- Hits         143198   143154      -44     
- Misses        63443    63462      +19     
- Partials      11554    11568      +14     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 65.61% <ø> (-0.02%) ⬇️
temurin 65.61% <ø> (-0.02%) ⬇️
unittests 65.60% <ø> (-0.02%) ⬇️
unittests1 56.97% <ø> (-0.03%) ⬇️
unittests2 37.97% <ø> (-0.01%) ⬇️

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.

🟡 Not ready to approve

GET /tables/livebrokers currently converts all exceptions into 404 NOT_FOUND despite documenting 500, and this should be corrected before the singular endpoint removal makes the plural endpoint the primary path.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Removes long-deprecated public APIs (controller REST + pinot-common helpers) as part of the 1.2.0-cycle deprecation sweep, shrinking the supported surface area while keeping the non-deprecated replacements intact.

Changes:

  • Removed deprecated controller endpoint GET /tables/{tableName}/livebrokers (singular), keeping the cluster-scoped GET /tables/livebrokers.
  • Removed deprecated RequestUtils statics getFunctionExpression(String) and getOptionsFromJson(JsonNode, String).
  • Removed deprecated BrokerResponse.getProcessingExceptions() default method (JSON response shape remains unchanged since it was @JsonIgnore).
File summaries
File Description
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableInstances.java Deletes the deprecated singular live-brokers endpoint and its unused import.
pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java Removes deprecated helper overloads with no remaining in-repo callers.
pinot-common/src/main/java/org/apache/pinot/common/response/BrokerResponse.java Removes deprecated getProcessingExceptions() default method from the broker response interface.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines 160 to 162
@GET
@Path("/tables/livebrokers")
@Authorize(targetType = TargetType.CLUSTER, action = Actions.Cluster.GET_BROKER)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — this is a real bug, fixed in #19148.

Checking getTableToLiveBrokersMapping, unknown tables are silently filtered out rather than reported, so nothing it throws is a lookup miss. What it does throw is IllegalStateException when the broker ExternalView is missing (plus whatever Helix/ZK raises) — so a cluster-level misconfiguration was being reported to clients as "not found", and the documented 500 was unreachable. Now maps to INTERNAL_SERVER_ERROR and passes the cause through so it gets logged.

Note this is the surviving plural endpoint, independent of the singular one removed here, so the fix applies cleanly either way.

@xiangfu0
xiangfu0 merged commit 0746341 into apache:master Aug 2, 2026
12 of 13 checks passed
@xiangfu0
xiangfu0 deleted the xiangfu0/remove-deprecated-1.2 branch August 2, 2026 21:30
xiangfu0 added a commit to xiangfu0/pinot that referenced this pull request Aug 2, 2026
Follow-ups to the review comments on apache#19139 and apache#19142. No API is removed
here; this is cleanup of loose ends left by those PRs plus one bug fix.

- Drop the now-redundant (List<IndexType>) null casts at FieldConfig call
  sites. Those casts existed only to disambiguate the singular-IndexType
  5-arg constructor from the List one; apache#19139 removes the former, so bare
  null now resolves unambiguously. Also drops the java.util.List import in
  AvgAggregationFunctionTest, which is unused once the casts are gone.

- GET /tables/livebrokers mapped every exception to 404 NOT_FOUND while
  declaring only 200 and 500. getTableToLiveBrokersMapping filters unknown
  tables rather than reporting them, so nothing it throws is a lookup miss:
  a missing broker ExternalView surfaces as IllegalStateException and was
  being reported to clients as "not found", and the documented 500 was
  unreachable. Map to INTERNAL_SERVER_ERROR and keep the cause.

- MaterializedViewTaskExecutorFactory fell back to an empty PinotConfiguration
  when _minionConf was null. Once apache#19139 removes the deprecated 1-arg init,
  _minionConf is always set, so the branch is dead; if it were ever reached it
  would silently build a plaintext gRPC client with default limits instead of
  the configured TLS one. Replaced with a Preconditions check.
xiangfu0 added a commit that referenced this pull request Aug 3, 2026
Follow-ups to the review comments on #19139 and #19142. No API is removed.

- Drop the now-redundant (List<IndexType>) null casts at FieldConfig call sites.
  They existed only to disambiguate the singular-IndexType 5-arg constructor from
  the List one; with the former removed in #19139, bare null resolves
  unambiguously. Also drops the java.util.List import in AvgAggregationFunctionTest,
  unused once the casts are gone, and collapses the call sites that no longer need
  to wrap.

- GET /tables/livebrokers mapped every exception to 404 NOT_FOUND while declaring
  only 200 and 500. getTableToLiveBrokersMapping filters unknown tables rather than
  reporting them, so nothing it throws is a lookup miss: a missing broker
  ExternalView surfaced as IllegalStateException and was reported to clients as
  'not found', and the documented 500 was unreachable. Map to INTERNAL_SERVER_ERROR
  with a stable message, keeping the cause for the logs.

- MaterializedViewTaskExecutorFactory fell back to an empty PinotConfiguration when
  _minionConf was null, which would silently build a plaintext gRPC client with
  default limits instead of the configured TLS one. With the deprecated 1-arg init
  removed, that branch is dead. Replaced with Preconditions checks covering both
  _minionConf and _zkMetadataManager, at the top of create() so they run on every
  call rather than only the first.
xiangfu0 added a commit to pinot-contrib/pinot-docs that referenced this pull request Aug 3, 2026
Documents the upgrade impact of apache/pinot#19142, including the
replacement live-brokers endpoint, response-shape migration, and removed
RequestUtils APIs. Validation: git diff --check.

Co-authored-by: Xiang Fu <xiangfu@xiangs-macbook-pro-1.wyvern-sun.ts.net>
@xiangfu0

xiangfu0 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Documentation follow-up: pinot-contrib/pinot-docs#958

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.

4 participants