-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: failed to read value pointer from vlog file #926
Comments
@256dpi Can you check if your badger directory has vlog file with id
This can't be the case. We fix the reference before removing the vlog fie.
|
I wasn't able to recover any data as I purged the directory right away to get the service running again... Next time I'll do that first! Here are the logs tough:
As you can see the process crashed due to a Again I was running the database with About the environment: The process was running in GKE and writing to an attached SSD PD. |
I have a wild guess about what might have happened.
|
@jarifibrahim It happened again! This time even with |
Thanks @256dpi! Can you please send the badger directory to [email protected]? |
This issue does not depend on the value of func TestCrash(t *testing.T) {
dir, err := ioutil.TempDir("", "badger-test")
require.NoError(t, err, "temp dir for badger count not be created")
fmt.Println(dir)
ops := getTestOptions(dir)
ops.ValueLogMaxEntries = 1
db, err := Open(ops)
require.NoError(t, err)
entries := []*Entry{{
Key: y.KeyWithTs(lfDiscardStatsKey, 1),
Value: make([]byte, ops.ValueThreshold+100),
}}
req, err := db.sendToWriteCh(entries)
if err != nil {
panic(err)
}
req.Wait()
db.Update(func(txn *Txn) error {
e := NewEntry([]byte("f"), []byte("1")).WithMeta(bitFinTxn)
require.NoError(t, txn.SetEntry(e))
return nil
})
db.Update(func(txn *Txn) error {
e := NewEntry([]byte("ff"), []byte("1")).WithMeta(bitFinTxn)
require.NoError(t, txn.SetEntry(e))
return nil
})
tr := trace.New("Badger.ValueLog", "GC")
lf := db.vlog.filesMap[0]
require.NoError(t, db.vlog.rewrite(lf, tr))
require.NoError(t, db.Close())
db, err = Open(ops)
require.NoError(t, err)
require.NoError(t, db.Close())
} I'm still trying to figure out why the discard key is pointing to the wrong value log file. |
This has been fixed via #929 . Closing it. |
Awesome! Thanks! |
I'm using v2.0.0-rc2 and has the same bug |
@cedricfung The fix wasn't part of v2.0.0-rc2 release. Please use the master branch for now. You might need to backup and restore your current badger directory to use it with the latest master.
|
I ported the fix to the release 2.0 branch, and it works. |
I'm having the same problem with v1.0.16 after a crash. How can I recover the data? I just need Dgraph to start so that I can run a backup - which I will then restore to a :master version. |
Similar to @williamsandytoes - same problem with dgraph 1.0.17. Is there any way to recover data? |
In func (vlog *valueLog) populateDiscardStats() error {
return nil
} |
I just ran into this when I restarted a service a bunch of times:
Since I'm running badger with
SyncWrites=false
is it possible thatRunValueLogGC
deleted a vlog that still was referenced by a persisted table?I'm using
go1.12
and badgerv1.6.0
.The text was updated successfully, but these errors were encountered: