Skip to content

Commit 7a642af

Browse files
committed
txn.Get correction, don't break early due to tombstone, causes inconsistencies. Minor adjustment from prior commit.
1 parent 07de2c9 commit 7a642af

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

txn.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,10 @@ func (txn *Txn) Get(key []byte) ([]byte, error) {
258258
return bestValue, nil // Early return
259259
}
260260

261-
// If we found a deletion marker, we can return nil
262-
if val == nil && ts == 0 {
263-
return nil, fmt.Errorf("key not found")
264-
}
265-
266261
}
267262
}
268263

269-
if bestValue != nil {
264+
if bestValue != nil { // Checks if we found a value, can be tombstone
270265
return bestValue, nil
271266
}
272267

0 commit comments

Comments
 (0)