Skip to content

Add completion timestamp and historical listing to RebalanceProgress #3965

Description

@affo

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Admin#listRebalanceProgress returns RebalanceProgress, which carries rebalanceId, status, a progress fraction, and a per-bucket map — but no timestamp for when a rebalance started or finished. In addition, calling listRebalanceProgress(null) only ever returns the currently in-progress rebalance task; there's no way to retrieve information about rebalances that have already completed.

This makes it impossible to build any operator-facing tooling that answers "when did the cluster last rebalance?" or "how long did the last rebalance take?" — useful for health dashboards, alerting, and audit trails. Today that information is only recoverable by tailing server logs.

Solution

  • Add startedAt/completedAt (or equivalent) timestamp fields to RebalanceProgress.
  • Retain a bounded history of recently-completed rebalance tasks (server-side or ZooKeeper-backed) so that listRebalanceProgress (or a new method) can return past tasks, not just the current in-progress one — including their final status (COMPLETED/FAILED/CANCELLED) and timestamps.
  • A retention window/limit (e.g. keep the last N completed tasks) would bound the added storage/memory cost.

Anything else?

No response

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions