BITSET and BITFIELD SET only propagate command when the value changed.#9403
Merged
oranagra merged 3 commits intoredis:unstablefrom Aug 22, 2021
Merged
BITSET and BITFIELD SET only propagate command when the value changed.#9403oranagra merged 3 commits intoredis:unstablefrom
oranagra merged 3 commits intoredis:unstablefrom
Conversation
…nged. In old way, we always increase server.dirty in BITSET and BITFIELD SET/INCRBY. Even the command doesn't really change anything.
oranagra
approved these changes
Aug 21, 2021
Member
oranagra
left a comment
There was a problem hiding this comment.
Please update the top comment to specify the implications (excessive AOF and replica traffic, keyspace notification, WATCH and client tracking in validations.
e7d6941 to
f96dd72
Compare
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
Sep 8, 2021
redis#9403) In old way, we always increase server.dirty in BITSET and BITFIELD SET. Even the command doesn't really change anything. This commit make sure BITSET and BITFIELD SET only increase dirty when the value changed. Because of that, if the value not changed, some others implications: - Avoid adding useless AOF - Reduce replication traffic - Will not trigger keyspace notifications (setbit) - Will not invalidate WATCH - Will not sent the invalidation message to the tracking client
guybe7
added a commit
to guybe7/redis
that referenced
this pull request
Mar 21, 2022
Bug introduced in redis#9403, caused inconsistency between master and replica in case just the length (i.e. set a high-index bit to 0) changed.
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 old way, we always increase server.dirty in BITSET and BITFIELD SET.
Even the command doesn't really change anything. This commit make
sure BITSET and BITFIELD SET only increase dirty when the value changed.
Because of that, if the value not changed, some others implications:
Fixes #1314