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

[IMPROVED] Last msg lookup (KV Get) when subject is a literal subject #4232

Merged
merged 1 commit into from Jun 10, 2023

Conversation

derekcollison
Copy link
Member

When messages were very small and the key space was very large the performance of last message gets in the store layer (both file and memory) would degrade.

If the subject is literal we can optimize and avoid sequence scans that are needed when multiple subject states need to be considered.

Signed-off-by: Derek Collison derek@nats.io

Resolves #4221

Signed-off-by: Derek Collison <derek@nats.io>
@derekcollison derekcollison requested a review from a team as a code owner June 10, 2023 20:31
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

LGTM

@derekcollison derekcollison merged commit 783e949 into main Jun 10, 2023
2 checks passed
@derekcollison derekcollison deleted the fix-4221 branch June 10, 2023 22:23
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.

KV Get message rate increases with message size
2 participants