Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce size of meta snapshots further #6189

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Conversation

neilalexander
Copy link
Member

We would not expect to respond to a consumer assignment after, e.g. a restart, and we don't store these for stream assignments already, therefore the subject and reply fields do not need to be encoded for consumer assignments either.

Similarly, the stream name doesn't need to be repeated for each consumer assignment either, as we can just pull that out of the parent stream assignment when decoding, so don't encode that either.

This should further reduce the size of meta snapshots and, with it, reduce their encoding/decoding time.

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

…napshots

Signed-off-by: Neil Twigg <neil@nats.io>
… stream assignment

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander requested a review from a team as a code owner November 29, 2024 14:23
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

I think would be good to periodically check the assignments, maybe during snapshot and if we know we have responded can drop it to the bare essentials in memory.

@derekcollison derekcollison merged commit 211af6a into main Nov 29, 2024
5 checks passed
@derekcollison derekcollison deleted the neil/smallersnapshots branch November 29, 2024 17:42
neilalexander added a commit that referenced this pull request Dec 2, 2024
Includes:

- #6187
- #6174
- #6189
- #6192

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Dec 3, 2024
This was changed in #6189 but we need it to be in the snapshot after all
in order to be able to safely roll back to earlier versions.

Signed-off-by: Neil Twigg <neil@nats.io>
derekcollison added a commit that referenced this pull request Dec 3, 2024
This was changed in #6189 but we need it to be in the snapshot after all
in order to be able to safely roll back to earlier versions.

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Dec 3, 2024
This was changed in #6189 but we need it to be in the snapshot after all
in order to be able to safely roll back to earlier versions.

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.

2 participants