DB can't be opened after crash #1023
Labels
area/crash
This issue causes a panic or some other of exception that causes a crash.
kind/bug
Something is broken.
priority/P1
Serious issue that requires eventual attention (can wait a bit)
status/confirmed
The issue has been triaged by still not reproduced.
What version of Go are you using (
go version
)?What version of Badger are you using?
1.6.0, with local patches to fix value log GC (TxnTooBig) and bloom filter memory use. (Without the local patches, vlog GC doesn't work and memory use OOMs the machine way to easily)
Does this issue reproduce with the latest master?
Dunno, master binary format is different so the broken DB I created is incompatible.
What are the hardware specifications of the machine (RAM, OS, Disk)?
SLES Linux in a VM, 8GB RAM
What did you do?
Ran a test program which does concurrent writes and value log GC, then performs reads to validate data is accessible. This program generates the busted databas: main.go.txt.
Within 24 hours, that test program spewed out some warnings about "This entry should have been caught". I copied the DB to another machine (Ubuntu, same arch) for analysis and tried to open it with a dumb test program.
What did you expect to see?
I expect to be able to Open() the database.
What did you see instead?
Attempt to open the database failed with error:
Indeed, value log file 33 is no longer present.
Repeated attempts to open the database always failed with the same error. On inspection of the
populateDiscardStats
function, it looks like it doesn't properly handle the case where the!badger!discard
value has been moved to a later value log file.When I hacked in some code into
populateDiscardStats
to handleErrRetry
then it seemed to fix the problem.The text was updated successfully, but these errors were encountered: