-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Describe the bug
Sometimes a simple badger.Open() with default options returns error z.NewFile.
To Reproduce
Keep writing data, closing, reopening, writing data, etc...
A second look gave me the way to reproduce it:
- Just leave the dir state containing
.memfiles.
In this case, badger.Open() always return z.NewFile.
Expected behavior
No error. In fact, a second call to badger.Open() returns no error.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- OS: macOS, Linux
- Language: Go
- Version: v4.7.0
Additional context
This portion of code here seems to be the root cause. So openMemTable can return mt, z.NewFile as per ref. But mt != nil in this case.
Other portions of the code make sense of it, like here.
Metadata
Metadata
Assignees
Labels
No labels