readdb: save walSequence provided by data file

This commit is contained in:
Simone Gotti 2019-07-18 13:39:12 +02:00
parent 16820e9033
commit 3f64bda0cc
2 changed files with 20 additions and 0 deletions

View File

@ -188,6 +188,16 @@ func (r *ReadDB) SyncFromDump() (string, error) {
} }
} }
err = r.rdb.Do(func(tx *db.Tx) error {
if err := r.insertCommittedWalSequence(tx, dumpIndex.WalSequence); err != nil {
return err
}
return nil
})
if err != nil {
return "", err
}
return dumpIndex.WalSequence, nil return dumpIndex.WalSequence, nil
} }

View File

@ -702,6 +702,16 @@ func (r *ReadDB) SyncFromDump() (string, error) {
} }
} }
err = r.rdb.Do(func(tx *db.Tx) error {
if err := r.insertCommittedWalSequenceOST(tx, dumpIndex.WalSequence); err != nil {
return err
}
return nil
})
if err != nil {
return "", err
}
return dumpIndex.WalSequence, nil return dumpIndex.WalSequence, nil
} }