Skip to content

Add meta_compact_size option to further control JetStream meta group compaction/snapshotting#7521

Merged
neilalexander merged 1 commit intomainfrom
neil/metacompactsize
Nov 6, 2025
Merged

Add meta_compact_size option to further control JetStream meta group compaction/snapshotting#7521
neilalexander merged 1 commit intomainfrom
neil/metacompactsize

Conversation

@neilalexander
Copy link
Copy Markdown
Member

This continues from #7484 by adding meta_compact_size too, which allows controlling the upper limit of the metalayer log before compaction by size rather than the number of entries.

If both meta_compact and meta_compact_size are configured, compaction happens when the lower of the two is reached.

If neither are configured, each doSnapshot() call will compact, as before.

Signed-off-by: Neil Twigg neil@nats.io

…p compaction/snapshotting

Signed-off-by: Neil Twigg <neil@nats.io>
Copy link
Copy Markdown
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander marked this pull request as ready for review November 6, 2025 16:29
@neilalexander neilalexander requested a review from a team as a code owner November 6, 2025 16:29
@neilalexander neilalexander merged commit 5441ef3 into main Nov 6, 2025
89 of 92 checks passed
@neilalexander neilalexander deleted the neil/metacompactsize branch November 6, 2025 16:29
@derekcollison
Copy link
Copy Markdown
Member

I still think we should prefer to never compact under normal situations and only on restart.

neilalexander added a commit that referenced this pull request Nov 7, 2025
Includes the following:

- #7518
- #7519
- #7520
- #7521
- #7522
- #7523
- #7517
- #7525
- #7526
- #7527
- #7524

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Nov 7, 2025
Includes the following:

- #7518
- #7519
- #7520
- #7521
- #7522
- #7523
- #7517
- #7525
- #7526
- #7527
- #7524

Signed-off-by: Neil Twigg <neil@nats.io>
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.

4 participants