-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix zset add the same member with different scores (#298)
Fix the corner case that adds the same member which may add the score column family many times and cause problems in the ZRANGE command. For example, we add members with `ZADD mykey 1 a 2 a` and `ZRANGE mykey 0 1` return only one member(`a`) was expected but got the member `a` twice now. The root cause of this issue was the score key was composed by member and score, so the last one can't overwrite the previous one when the score was different. A simple workaround was to add those members with reversed orders and skip the member if has added.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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