Repository navigation
Bound PartitionInfo snapshot buffers via config_node_snapshot_buffer_size_max - #18580
Merged
JackieTien97 merged 1 commit intoSep 4, 2026
Conversation
JackieTien97
requested changes
Sep 4, 2026
JackieTien97
left a comment
Contributor
There was a problem hiding this comment.
Requesting changes because the new stream-based template snapshot recovery regresses an accepted vector-schema form. The remaining inline comments cover a low-priority buffer-cap contract issue and cleanup/documentation items.
CRZbulabula
force-pushed
the
improve/bounded-confignode-snapshot-buffers
branch
from
September 4, 2026 06:25
109f543 to
4401337
Compare
CRZbulabula
force-pushed
the
improve/bounded-confignode-snapshot-buffers
branch
from
September 4, 2026 06:32
4401337 to
864a759
Compare
…size_max - Add SnapshotStreamFactory (node-commons) providing capped and reusable buffered streams for ConfigNode snapshot files, bounded by the new config_node_snapshot_buffer_size_max parameter (default 4MB; 0 disables buffering). Write buffers are pooled per thread via SoftReference. - PartitionInfo routes its snapshot load/save streams through the factory, replacing the previous fixed 32MB buffer. The read buffer is sized from the file size and the write buffer is capped by the configured limit. - Edge distribution caps the snapshot buffer at 8KB. - Scope is confined to PartitionInfo: no other snapshot code paths are changed.
CRZbulabula
force-pushed
the
improve/bounded-confignode-snapshot-buffers
branch
from
September 4, 2026 06:40
864a759 to
41525a7
Compare
JackieTien97
approved these changes
Sep 4, 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.
Problem
Taking a ConfigNode snapshot always allocated a fixed 32MB heap buffer (
PARTITION_TABLE_BUFFER_SIZEhard-coded inPartitionInfo), regardless of the actual partition table size. On edge deployments the default heap is only 224MB and ConfigNode snapshots are triggered frequently, so the fixed allocation can cause GC spikes when the partition table is small.Changes
SnapshotStreamFactory+ReusableBufferedOutputStream(node-commons) providing capped and reusable buffered streams for snapshot files. The buffer size is bounded by the newconfig_node_snapshot_buffer_size_maxparameter (default 4MB; 0 disables buffering), and write buffers are pooled per thread viaThreadLocal+SoftReference.PartitionInfo: replace the fixed 32MB buffer with the factory. The read buffer is sized from the file size and capped by the parameter, and the write buffer is capped and reused across snapshots on the same thread.config_node_snapshot_buffer_size_max=8192, documented iniotdb-system.properties.template.PartitionInfo: no other snapshot code paths are changed.Tests
SnapshotStreamFactoryTest(buffer cap, disabled-buffering passthrough, round-trip with buffer wrap-around, large-write bypass, buffer reuse, idempotent close).ConfigNodeConfigTest(default alignment with the factory cap, setter validation).PartitionInfoTestruns all snapshot round-trips with a 64KB buffer cap, including a snapshot larger than the write buffer.