Badger: panic: During db.vlog.open: Value log truncate required to run DB.

Created on 1 Jun 2020  路  3Comments  路  Source: dgraph-io/badger


I appreciate this looks a lot like issue 1134/1261 - but a comment on that issue said the issue was fixed in v2.0.2, so this appears to be a regression?

What version of Go are you using (go version)?

$ go version
go version go1.14 windows/amd64

What operating system are you using?

Windows 7 Enterprise
Version 6.1 (Build 7601: Service Pack 1)

What version of Badger are you using?

v2.0.3

Does this issue reproduce with the latest master?

No idea.

Steps to Reproduce the issue


Application starts, write some data to the store, close application with Ctrl-C.
Re-start application - and you see the error about a panic during db.vlog.open.

What Badger options were set?


Only the directory of where to store the data, which is a subdirectory of wherever the app is run from.

What did you do?

Run once, close via Ctrl-C, re-run.

What did you expect to see?

Working normally.

What did you see instead?

Panic.

kinquestion

Most helpful comment

@jarifibrahim - wonderful, that's all I needed. Thanks for the prompt reply.

All 3 comments

@godeater Badger will try to truncate some half-saved data when the crash happens. This is the expected behavior. Everything should work fine if you start badger with opt.Truncate=true..

@jarifibrahim - wonderful, that's all I needed. Thanks for the prompt reply.

Happy to help, @godeater!

Was this page helpful?
0 / 5 - 0 ratings