[BUG]: db.Backup maybe see the partial write
in one transaction
#2049
Labels
kind/bug
Something is broken.
partial write
in one transaction
#2049
What version of Badger are you using?
v4.2.0
What version of Go are you using?
go version go1.21.0 darwin/amd64
Have you tried reproducing the issue with the latest release?
None
What is the hardware spec (RAM, CPU, OS)?
What steps will reproduce the bug?
Below code will panic:
It will panic probabilistic:
In the application, it write two keys in one transaction,for example:
rand#3_key
to1
, set1_3_key
to1
in the same transactionrand#3_key=1
and1_3_key
didn't existsIf the lock is enabled in backup and transaction, panic never happened.
Expected behavior and actual result.
It never panic,when db.Backup is called,it will behavior as
Snapshot Read
.Additional information
No response
The text was updated successfully, but these errors were encountered: