mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 03:17:50 +00:00
Fix RBF checkpoint on reopen.
Previously, the `rbf.DB.opened` flag was set after `checkpoint()` when reopening, however, this flag is checked by `checkpoint()` so it was not properly executing.
This commit is contained in:
parent
c5e9b8d917
commit
b1e806a518
1 changed files with 2 additions and 2 deletions
|
|
@ -129,6 +129,8 @@ func (db *DB) Open() (err error) {
|
|||
return fmt.Errorf("create wal dir: %w", err)
|
||||
}
|
||||
|
||||
db.opened = true
|
||||
|
||||
// Open write-ahead log & checkpoint to the end since no transactions are open.
|
||||
if err := db.openWALSegments(); err != nil {
|
||||
return fmt.Errorf("wal open: %w", err)
|
||||
|
|
@ -136,8 +138,6 @@ func (db *DB) Open() (err error) {
|
|||
return fmt.Errorf("checkpoint: %w", err)
|
||||
}
|
||||
|
||||
db.opened = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue