fix(spans): use decompressed bytes size for oversized segment check#109839
Open
fix(spans): use decompressed bytes size for oversized segment check#109839
Conversation
Contributor
Backend Test FailuresFailures on
|
evanh
approved these changes
Mar 4, 2026
| else | ||
| ingested_count_step_latency_ms = ingested_count_end_time_ms - sunionstore_args_end_time_ms | ||
| end | ||
| local ingested_count_step_latency_ms = ingested_count_end_time_ms - sunionstore_args_end_time_ms |
Member
There was a problem hiding this comment.
I don't think this is correct, if you remove spop_end_time_ms then you need to check arg_cleanup_end_time_ms and use that if it exists.
Contributor
Backend Test FailuresFailures on
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In add-buffer, we compared the compressed segment sizes with max_segment_bytes, but when flushing, we use the decompressed segment size to determine whether we should drop the segment. So, we don't see spop called when the compressed size is under 20MiB but the uncompressed size is oversized.
This PR changes the EVALSHA logic to use the uncompressed sizes to determine if a segment is oversized if we should skip merging.
We also remove the
spopstep since we cannot determine which spans to evict from the compressed set members alone , since redis memory usage of the set doesn't reflects its uncompressed ingested size.