Cannot open encrypted DB after writing with StreamWriter #1144
Labels
area/crash
This issue causes a panic or some other of exception that causes a crash.
kind/bug
Something is broken.
priority/P0
Critical issue that requires immediate attention.
status/accepted
We accept to investigate or work on it.
What version of Go are you using (
go version
)?What version of Badger are you using?
Badger v2.0.0
Does this issue reproduce with the latest master?
Yes (407e5bd)
What are the hardware specifications of the machine (RAM, OS, Disk)?
Ubuntu Linux
What did you do?
I'm using StreamWriter to write to badger with encryption enabled.
What did you expect to see?
Running the program once works. Running it a second time to re-open the existing encrypted DB gives an error. I expect to successfully open the DB the second time around.
What did you see instead?
After a second run, the DB fails to open with an error message related to protos:
Doing this for several runs can give different error messages:
Additional notes
If encryption is enabled (run the sample program with
--encrypt=false
), then re-opening the DB works as expected.The text was updated successfully, but these errors were encountered: