Skip to content

[server] Store rebalance tasks in remote storage - #5133

Open
swuferhong wants to merge 1 commit into
apache:mainfrom
swuferhong:refactor-rebalance-plan-storage
Open

swuferhong wants to merge 1 commit into
apache:mainfrom
swuferhong:refactor-rebalance-plan-storage

Conversation

@swuferhong

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3868

A rebalance task contains the complete bucket migration plan. As clusters grow, the serialized task can approach ZooKeeper's znode size limit, which may cause persistence or coordinator recovery to fail.

Loading a large rebalance task synchronously during coordinator initialization would also make coordinator startup depend on remote storage latency and availability.

This PR stores large rebalance tasks in remote storage while keeping ZooKeeper as the authoritative pointer. It also moves rebalance recovery out of the synchronous coordinator startup path.

Brief change log

Tests

API and Format

Documentation

@swuferhong
swuferhong force-pushed the refactor-rebalance-plan-storage branch 4 times, most recently from 00d1f9b to 2d862fd Compare November 11, 2026 07:36
Persist large rebalance tasks in immutable remote files referenced by versioned ZooKeeper handles, while retaining the inline format until every live coordinator advertises support.

Load recovery asynchronously and move task persistence off the coordinator event thread. Retry recovery failures with capped exponential backoff and preserve cancellation correctness across asynchronous persistence.

Verify ambiguous ZooKeeper writes from committed state and fence list and cancel requests while a new task is being persisted.

Co-Authored-By: Codex <noreply@openai.com>

AI-Model: gpt-5
AI-Contributed/Feature: 44/44
AI-Contributed/UT: 57/57
@swuferhong
swuferhong force-pushed the refactor-rebalance-plan-storage branch from 2d862fd to e2f1b36 Compare November 11, 2026 08:08
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.

[server] Store large rebalance plans outside ZooKeeper

1 participant