Skip to content

Commit

Permalink
fix: bucket.Set incorrectly set delete flag
Browse files Browse the repository at this point in the history
  • Loading branch information
qianbin committed Apr 30, 2022
1 parent f5a9b2c commit 0500923
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ func (b *bucket) Set(key []byte, keyHash uint64, val []byte) (ok bool) {
if ent.Match(key) && ent.UpdateValue(val) {
ent.AddFlag(recentlyUsedFlag)
ok = true
} else {
ent.AddFlag(deletedFlag)
}
ent.AddFlag(deletedFlag)
}
if !ok {
newEnt, offset := b.allocEntry(entrySize)
Expand Down

0 comments on commit 0500923

Please sign in to comment.