-
Notifications
You must be signed in to change notification settings - Fork 0
Code Review Bench PR #14283 - Redis 8.2.1 #6
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2705,6 +2705,7 @@ int streamEntryIsReferenced(stream *s, streamID *id) { | |||||
| return 1; | ||||||
|
|
||||||
| /* Check if the message is in any consumer group's PEL */ | ||||||
| if (!s->cgroups_ref) return 1; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 Bug: Null cgroups_ref returns 1 (referenced) instead of 0When Per the function's documented contract (line 2683): "Returns 1 if the entry is referenced, 0 if it's fully acknowledged by all groups." When Returning Was this helpful? React with 👍 / 👎
Suggested change
|
||||||
| unsigned char buf[sizeof(streamID)]; | ||||||
| streamEncodeID(buf, id); | ||||||
| return raxFind(s->cgroups_ref, buf, sizeof(streamID), NULL); | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| #define REDIS_VERSION "8.2.0" | ||
| #define REDIS_VERSION_NUM 0x00080200 | ||
| /* Version information */ | ||
| #define REDIS_VERSION "8.2.1" | ||
| #define REDIS_VERSION_NUM 0x00080201 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -67,6 +67,14 @@ run_solo {defrag} { | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| proc discard_replies_every {rd count frequency discard_num} { | ||||||
| if {$count % $frequency != 0} { | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
| if {$count % $frequency != 0} { | |
| if {$count % $frequency == 0} { |
- Apply suggested fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 Bug: Defrag setting restored to hardcoded 1 instead of original value
Line 1956 saves the original defrag setting into
orig_active_defrag, and line 1957 correctly disables it before the flush. However, line 1962 restoresserver.active_defrag_enabledto the hardcoded value1instead of restoring it toorig_active_defrag.This means that if active defragmentation was originally disabled (
server.active_defrag_enabled == 0), after the database flush completes, defrag will be forcibly enabled. This defeats the entire purpose of the save/restore pattern and introduces a configuration mutation side-effect inrdbLoadEmptyDbFunc().Impact: Any replica that has
activedefrag noconfigured will have defrag silently enabled after every replication sync flush, potentially causing unexpected CPU usage and behavior changes.Was this helpful? React with 👍 / 👎