mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 16:57:06 +08:00
Bug fix : ZPOPMIN command.
Fixed the error caused by incorrect "boder" pass value. And added a simple unit test to verify correctness.
This commit is contained in:
@@ -220,7 +220,7 @@ func (sortedSet *SortedSet) PopMin(count int) []*Element {
|
||||
Value: first.Score,
|
||||
Exclude: false,
|
||||
}
|
||||
removed := sortedSet.skiplist.RemoveRangeByScore(border, border, count)
|
||||
removed := sortedSet.skiplist.RemoveRangeByScore(border, positiveInfBorder, count)
|
||||
for _, element := range removed {
|
||||
delete(sortedSet.dict, element.Member)
|
||||
}
|
||||
|
Reference in New Issue
Block a user