Skip to content

Remove deprecated dead methods from PinotHelixResourceManager#18778

Closed
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:remove-deprecated-resource-manager-methods
Closed

Remove deprecated dead methods from PinotHelixResourceManager#18778
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:remove-deprecated-resource-manager-methods

Conversation

@Akanksha-kedia

Copy link
Copy Markdown
Contributor

Description

Removes three @Deprecated methods from PinotHelixResourceManager that have no callers outside the class. This continues the pattern of cleaning up dead deprecated code (similar to #18699, #18472, #17072).

Methods removed

Method Replaced by Callers
deleteSchema(Schema) deleteSchema(String) None — the only non-test caller already uses the String overload
getSchemaForTableConfig(TableConfig) ZKMetadataProvider.getTableSchema() directly None
getServersForSegment(String, String) getServers(String, String) None

All three methods were marked @Deprecated with their successors already in use. Removing them reduces the API surface and eliminates dead code.

Tests

No test changes needed — no test callers exist for these methods.

Checklist

  • No new public APIs without documentation
  • Backward compatible change (methods were already deprecated; no callers remain)
  • Code follows existing patterns in the codebase

Three @deprecated methods have no callers outside the class and can be
safely removed:

- deleteSchema(Schema): replaced by deleteSchema(String). No external
  callers; the only non-test caller uses the String overload.
- getSchemaForTableConfig(TableConfig): thin wrapper around
  ZKMetadataProvider.getTableSchema(). No external callers.
- getServersForSegment(String, String): renamed to getServers(). No
  external callers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Akanksha-kedia

Copy link
Copy Markdown
Contributor Author

@xiangfu0

@codecov-commenter

codecov-commenter commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.81%. Comparing base (6464736) to head (068cfbd).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18778      +/-   ##
============================================
+ Coverage     64.78%   64.81%   +0.03%     
  Complexity     1309     1309              
============================================
  Files          3380     3380              
  Lines        209540   209535       -5     
  Branches      32797    32797              
============================================
+ Hits         135751   135815      +64     
+ Misses        62863    62801      -62     
+ Partials      10926    10919       -7     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.81% <ø> (+0.03%) ⬆️
temurin 64.81% <ø> (+0.03%) ⬆️
unittests 64.81% <ø> (+0.03%) ⬆️
unittests1 56.98% <ø> (+<0.01%) ⬆️
unittests2 37.28% <ø> (+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.

@xiangfu0 xiangfu0 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.

Found one high-signal compatibility issue; see inline comment.

* @param schema The schema to be deleted.
* @return True on success, false otherwise.
*/
@Deprecated

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.

These deprecated overloads are still public methods on a released controller artifact, so removing them is a binary-incompatible change for embedders compiled against current Pinot jars. Callers that still invoke deleteSchema(Schema), getSchemaForTableConfig(TableConfig), or getServersForSegment(...) will start failing with NoSuchMethodError on upgrade. Pinot usually keeps the old entry points as delegating shims until there is an explicit compatibility-removal plan.

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.

Agreed — thank you for the catch. I'll restore deleteSchema(Schema), getSchemaForTableConfig(TableConfig), and getServersForSegment(...) as delegating stubs so binary compatibility is preserved for callers on released jars. Will update this PR.

@Akanksha-kedia

Copy link
Copy Markdown
Contributor Author

@xiangfu0 @Jackie-Jiang all CI checks pass, review comments addressed. Please review when you get a chance.

…bility

Per xiangfu0's review: deleteSchema(Schema), getSchemaForTableConfig(TableConfig),
and getServersForSegment(...) are public methods on a released controller
artifact; removing them would cause NoSuchMethodError for callers compiled
against older jars. Restore as delegating stubs pending an explicit
removal plan.
@Akanksha-kedia

Copy link
Copy Markdown
Contributor Author

Closing this PR per xiangfu0's review. The three deprecated methods (deleteSchema(Schema), getSchemaForTableConfig(TableConfig), getServersForSegment(...)) are public API on a released pinot-controller artifact. Removing them is a binary-incompatible change that would cause NoSuchMethodError for callers compiled against older jars. The methods have been restored as delegating shims. A removal can be planned for a future major release with explicit deprecation notice.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants