Skip to content

[IMPROVED] Filestore MaxBytes/Msgs update performance#7455

Merged
neilalexander merged 1 commit intomainfrom
maurice/fs-max-limit
Oct 21, 2025
Merged

[IMPROVED] Filestore MaxBytes/Msgs update performance#7455
neilalexander merged 1 commit intomainfrom
maurice/fs-max-limit

Conversation

@MauriceVanVeen
Copy link
Copy Markdown
Member

If a stream would be updated from a high MaxBytes/MaxMsgs and then lowered such that many messages and blocks need to be purged, the server would walk over all individual sequences and remove them one-by-one. Instead, if the full block can be removed then loads of bytes/messages can be removed all at once. This speeds up discarding many old messages, especially when many gigabytes of data needs to be removed since we'll not need to load the messages into memory to remove them.

Resolves #7450

Signed-off-by: Maurice van Veen github@mauricevanveen.com

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner October 21, 2025 15:43
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Copy link
Copy Markdown
Member

@neilalexander neilalexander 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 merged commit 192d2bf into main Oct 21, 2025
89 of 92 checks passed
@neilalexander neilalexander deleted the maurice/fs-max-limit branch October 21, 2025 22:09
neilalexander added a commit that referenced this pull request Oct 28, 2025
Includes the following:

- #7380
- #7384
- #7385
- #7388
- #7395
- #7400
- #7399
- #7401
- #7402
- #7423
- #7424
- #7411
- #7428
- #7429
- #7431
- #7435
- #7433
- #7443
- #7455
- #7465
- #7466
- #7460
- #7484
- #7479

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

- #7435
- #7433
- #7436
- #7443
- #7440
- #7444
- #7452
- #7455
- #7458
- #7465
- #7466
- #7474
- #7469
- #7460
- #7449
- #7484
- #7479
- #7486
- #7495
- #7482
- #7496

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.

decreasing retention makes nats server unresponsive

2 participants