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

fix: stream bugs #4240

Merged
merged 1 commit into from
Dec 3, 2024
Merged

fix: stream bugs #4240

merged 1 commit into from
Dec 3, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Dec 2, 2024

This PR syncs some of the improvements that were introduced in streams in Redis 7.2.3 OSS.

  1. verify xsetid against max deleted id in the stream
  2. Implement precise memory measurement of streams for "memory usage" command.
  3. Always compact nodes in stream listpacks after creating new nodes.

This PR syncs some of the improvements that were introduced in streams in Redis 7.2.3 OSS.

1. verify xsetid against max deleted id in the stream
2. Implement precise memory measurement of streams for "memory usage" command.
3. Always compact nodes in stream listpacks after creating new nodes.

Signed-off-by: Roman Gershman <[email protected]>
@romange romange requested review from chakaz and kostasrim December 2, 2024 20:41
return size;
}

size_t MallocUsedStream(stream* s) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I did introduce the exact same function from Valkey and then removed it to replace it with the MemotryTracker 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this way we have a verification mechanism that MemotryTracker captures all the cases - we can run an external script that scans all the stream keys and calls "memory usage" to aggregate the sum

@romange romange merged commit 8d343bf into main Dec 3, 2024
9 checks passed
@romange romange deleted the Pr3 branch December 3, 2024 14:12
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.

3 participants