Skip to content

[server] Restore ZooKeeper batch read compatibility - #5129

Merged
wuchong merged 6 commits into
apache:mainfrom
platinumhamburg:fix-empty-partition-assignment
Nov 10, 2026
Merged

wuchong merged 6 commits into
apache:mainfrom
platinumhamburg:fix-empty-partition-assignment

Conversation

@platinumhamburg

@platinumhamburg platinumhamburg commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Closes #5128.

Restore the shared ZooKeeper batch read behavior from before #4029 so empty partition assignment ZNodes allow Coordinator initialization to continue. Keep the stricter error policy required by describeBuckets within its read path.

Brief change log

  • Restore processGetDataResponses() for table assignment, partition assignment, and LeaderAndIsr batch reads.
  • Read assignments and LeaderAndIsr in DescribeBucketsMetadataReader for describeBuckets, using the existing ZooKeeper batch request and strict response handling utilities.
  • Share the BucketMetadata field construction between the existing reads and the describe reader.
  • Cover empty and malformed assignments, successful results in mixed batches, and describeBuckets metadata fields and read failures for partitioned and non-partitioned tables.

Tests

  • Confirmed that testPartitionAssignmentsWithEmptyNode fails on the original implementation with No content to map due to end-of-input.
  • Passed ./mvnw -pl fluss-server -am -Dtest=ZooKeeperClientTest,RpcServiceBaseTest,ZkBasedMetadataProviderTest -Dsurefire.failIfNoSpecifiedTests=false verify on Java 11. All 45 tests passed in both configured test phases, together with Checkstyle, Spotless, and license checks.

API and Format

Existing assignment and LeaderAndIsr batch reads log and omit empty data or unsuccessful node responses. describeBuckets uses its dedicated reader, which ignores expected missing nodes and propagates other ZooKeeper errors to the RPC layer. Non-empty malformed assignment data raises a decoding error in both paths.

Documentation

The linked issue documents the startup failure and reproduction steps.

@platinumhamburg
platinumhamburg marked this pull request as ready for review November 10, 2026 07:26
@swuferhong
swuferhong self-requested a review November 10, 2026 07:30
@platinumhamburg platinumhamburg changed the title [server] Skip empty partition assignment ZNodes [server] Restore ZooKeeper batch read compatibility Nov 10, 2026

@wuchong wuchong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@platinumhamburg
platinumhamburg force-pushed the fix-empty-partition-assignment branch from 2cf7a07 to ca889a4 Compare November 10, 2026 13:38
@wuchong
wuchong merged commit bbcd173 into apache:main Nov 10, 2026
20 checks passed
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] Empty partition assignment ZNodes prevent Coordinator startup

4 participants