Skip to content

Add a scoped instance replica status API - #274

Draft
PranaviAncha wants to merge 3 commits into
linkedin:devfrom
PranaviAncha:99163324+PranaviAncha/ownership-replica-status
Draft

PranaviAncha wants to merge 3 commits into
linkedin:devfrom
PranaviAncha:99163324+PranaviAncha/ownership-replica-status

Conversation

@PranaviAncha

Copy link
Copy Markdown

Issues

  • No linked Helix issue.

Description

  • Adds a read-only instance replica status API that returns one scoped observation instead of requiring clients to combine multiple resource reads.

The response keeps non-task replica state, native drain completion, and future assignment eligibility separate. It reports an observation time, current-state sessions, state counts, ERROR replica details, pending messages, supported resource coverage, and typed blockers.

Drain completion is reported only when the FULL_AUTO and CUSTOMIZED scope is completely evaluated. Missing metadata, session inconsistencies, unsupported rebalance modes, and changes detected during the read produce conservative coverage instead of successful drain status. Existing evacuation and drain APIs retain their current behavior.

Tests

  • The following tests are written for this issue:

    • TestInstanceReplicaStatus
    • TestPerInstanceAccessor#testGetInstanceReplicaStatus
  • Local code review completed

  • The following is the result of the mvn test command on the appropriate modules:

    • TestInstanceReplicaStatus: 8 run, 0 failures, 0 errors, 0 skipped
    • TestPerInstanceAccessor#testGetInstanceReplicaStatus: 1 run, 0 failures, 0 errors, 0 skipped

Both commands ran with JDK 11 through the shared validation lock.

Changes that Break Backward Compatibility (Optional)

  • None. The HelixAdmin method is additive with a default implementation, the REST route is new, and existing drain API semantics are unchanged.

Documentation (Optional)

  • The public API model, coverage semantics, scopes, and fields are documented with Javadocs. No separate wiki page is required.

Commits

  • Commit subjects use imperative mood, remain under 50 characters, and describe what and why.

Code Quality

  • The diff follows the repository Java style and passes git diff --check.

🤖 Generated with GitHub Copilot CLI

PranaviAncha and others added 3 commits September 15, 2026 14:55
Expose one read-only observation for non-task replica states, native drain coverage, pending messages, and future assignment eligibility. Report incomplete and unsupported coverage conservatively instead of treating partial data as drained.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat a current-state record with no partitions as an empty replica scope. Do not require IdealState metadata for a resource that has no observed replicas.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Treat missing CURRENTSTATES and TASKCURRENTSTATES parent paths as an empty observed scope. Metadata access failures still propagate instead of producing successful coverage.

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