Skip to content

Drop @Override on MockHelixAdmin.getBatchDisabledInstances for Helix compat - #3300

Open
sjainit wants to merge 1 commit into
linkedin:masterfrom
sjainit:sarjain/drop-getbatchdisabledinstances-override
Open

sjainit wants to merge 1 commit into
linkedin:masterfrom
sjainit:sarjain/drop-getbatchdisabledinstances-override

Conversation

@sjainit

@sjainit sjainit commented Sep 9, 2026

Copy link
Copy Markdown

Summary

org.apache.helix.HelixAdmin.getBatchDisabledInstances(String) is being removed from the Helix HelixAdmin interface in linkedin/helix#253 (retiring the deprecated cluster-level DISABLED_INSTANCES config; disablement now lives at instance-level config).

MockHelixAdmin (test scope) implements HelixAdmin and carries an @Override on this method. Once Ambry bumps to the Helix release that removes it, the annotation will fail to compile:

error: method does not override or implement a method from a supertype

This was flagged during review of the Helix PR — the audit found Ambry's MockHelixAdmin (and one other repo) as external implementers that would break on the next Helix bump.

Change

Drop the @Override annotation while keeping the existing (already unused) stub. This makes the mock compile against both the current Helix version (method still present → the stub satisfies it) and the post-removal version (method gone → the stub is just an unused method), so it can merge independently of the Helix release timing.

The stub can be deleted entirely in a later cleanup once Ambry adopts the Helix release that removes the method.

Impact

  • Test scope only, no production code. Behavior unchanged (the stub already threw IllegalStateException and has no callers).
  • Verified via a LinkedIn-wide code search that getBatchDisabledInstances has no callers anywhere — it is dead interface surface.

Validation

CI compile against the current Helix version (annotation removal on a mock; no signature or behavior change).


Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…compat

org.apache.helix.HelixAdmin.getBatchDisabledInstances(String) is being
removed from the Helix interface (linkedin/helix#253). MockHelixAdmin
implements HelixAdmin, so once Ambry bumps to that Helix release the
@OverRide on this method would fail to compile ("method does not override
a method from its superclass").

Drop the @OverRide annotation while keeping the (already unused) stub so
the mock compiles against both the current and the post-removal Helix
versions, decoupling this change from the Helix release timing. The stub
can be deleted entirely once Ambry adopts the Helix release that removes
the method.

Test scope only; no production impact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant