Repository navigation
Backport the native snapshot size comparer - #153
Merged
Merged
Conversation
Adapt Apache ZooKeeper ZOOKEEPER-3427 by Michael Han (f90060b) to the existing Java 8 and CLI dependencies. Keep checksummed read-only snapshot loading, native launchers, operator documentation and synthetic CLI tests together. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 28, 2026
arkmish
marked this pull request as ready for review
October 7, 2026 16:15
bellatrix007
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an offline CLI for finding which subtrees grew, shrank, appeared, or disappeared between two ZooKeeper snapshots. It compares aggregate payload sizes and descendant counts, helping operators locate growth without querying a running ensemble.
This adapts Apache ZooKeeper's ZOOKEEPER-3427 implementation to the existing Java 8 and Commons CLI dependencies.
zkEnvconfiguration.The comparison includes ephemeral znodes, but does not compare payload contents, ACLs, or versions. Equal sizes and counts are not proof of identical contents. Snapshots are loaded into memory; no transaction logs are replayed.
Tests
Validated
SnapshotComparerTestandSnapStreamTestusing Maven on JDK 11 with Java 8 API targeting:The tests use synthetic native snapshots and real CLI subprocesses to cover additions/deletions, signed deltas, threshold boundaries, null data, ephemerals, compression, corruption, interactive input, and launcher argument forwarding.
Actual Java 8 VM and Windows launcher execution were not available.
Changes that Break Backward Compatibility (Optional)
None to existing client or server interfaces. This is an additional offline tool; it does not modify snapshots, server request handling, or persistence formats.
Documentation (Optional)
Updated
zookeeper-docs/src/main/resources/markdown/zookeeperTools.mdwith command options, examples, counting semantics, exit behavior, and snapshot-only limitations.🤖 Generated with GitHub Copilot CLI