Skip to content

Add a cluster-scoped convergence status API - #275

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

PranaviAncha wants to merge 6 commits into
linkedin:devfrom
PranaviAncha:99163324+PranaviAncha/ownership-convergence-status

Conversation

@PranaviAncha

Copy link
Copy Markdown

Issues

No linked GitHub issue.

Description

Add GET /clusters/{clusterId}/convergence-status so a caller can obtain Helix's convergence decision without hosting a cluster verifier.

The calculation is shared with StrictMatchExternalViewVerifier. Requests support STRICT or LENIENT matching and an optional resource scope. The response distinguishes CONVERGED, PENDING, and FAILED, with exact counts and bounded diagnostic detail.

The read borrows the server's accessor, creates no verifier or background worker, and does not write participant history or trigger rebalance. Missing metadata cannot become an empty successful result. Observation time does not imply an atomic controller snapshot.

Task resources without external views are reported as skipped. A leftover task external view is compared against an empty ideal state and counted as evaluated.

Tests

  • Local code review completed
  • Core convergence and existing verifier suites: 36 passed, 0 failures, 0 errors, 0 skipped.
  • REST convergence and existing cluster accessor suites: 59 passed, 0 failures, 0 errors, 0 skipped.

The selected Maven suites ran on JDK 11. The final follow-up changes only documentation.

Changes that Break Backward Compatibility (Optional)

The REST route is additive. Existing verifier matching behavior is retained through the shared evaluator.

Deploy the provider to every serving REST node before enabling callers to depend on the new route. An older server returns 404, which must not be interpreted as convergence.

Documentation (Optional)

The README documents the request, response, scope, failure semantics, and observation limits. Public API Javadocs describe the shared evaluator and result.

Commits

The commits are additive, use the repository's personal GitHub identity, and do not rewrite shared history.

Code Quality

The implementation follows the surrounding Java conventions and keeps evaluation separate from caller retry policy.

Generated with GitHub Copilot CLI

PranaviAncha and others added 6 commits September 15, 2026 14:29
Extract the external view comparison from StrictMatchExternalViewVerifier
into a reusable evaluation and report it through Helix REST, so a caller
that only wants to observe convergence does not have to run a verifier,
hold a connection open or wait on a callback. The verifier delegates to
the same evaluation, so the two cannot disagree.

Converged, pending and failed are reported separately, the observation
time is returned, and a failed read is an error rather than an empty
converged result. Loading the metadata for the read leaves participant
history untouched, which the controller refresh writes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A command parameter on the existing cluster read is answered by an older
server with the ordinary cluster payload and HTTP 200, so a caller that
reaches a node without this change during a rolling deployment receives a
successful response carrying no status. A dedicated path answers 404
there instead, which cannot be mistaken for convergence, and leaves the
existing cluster read untouched.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Unknown resources are reported by their own field, so the reason that was
never attached to one is removed rather than left as a second way to say
the same thing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe the invariant the test protects rather than how it relates to a
change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A requested resource that uses the task state model exists, so reporting
it as one Helix does not know about was wrong. Unknown resources are now
decided before anything is filtered out, and a resource that exists but
is not compared is reported as skipped instead of counted as evaluated,
so a caller can see what the answer rests on.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PranaviAncha
PranaviAncha force-pushed the 99163324+PranaviAncha/ownership-convergence-status branch from 0009e28 to e85e274 Compare September 17, 2026 05:09
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