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] High CPU and Memory usage on replicated mirrors with very high starting sequence. #4249

Merged
merged 1 commit into from Jun 16, 2023

Conversation

derekcollison
Copy link
Member

When creating replicated mirrors where the source stream had a very large starting sequence number, the server would use excessive CPU and Memory.

This is due to the mirroring functionality trying to skip messages when it detects a gap. In a replicated stream this puts excessive stress on the raft system.

This step is not needed at all if the mirror stream has no messages, we can simply jump ahead.

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

…arge starting sequence number, the server would use excessive CPU and Memory.

This is due to the mirroring functionality trying to skip messages when it detects a gap. In a replicated stream this puts excessive stress on the raft system.
This step is not needed at all if the mirror stream has no messages, we can simply jump ahead.

Signed-off-by: Derek Collison <derek@nats.io>
@derekcollison derekcollison requested a review from a team as a code owner June 16, 2023 00:34
@derekcollison derekcollison merged commit 4a1b281 into main Jun 16, 2023
2 checks passed
@derekcollison derekcollison deleted the mirror-large-first branch June 16, 2023 00:48
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.

None yet

2 participants