mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 22:51:02 +00:00
make the checkpoint async
This commit is contained in:
parent
806669fa0f
commit
6d68e71933
1 changed files with 6 additions and 6 deletions
12
rbf/db.go
12
rbf/db.go
|
|
@ -640,12 +640,12 @@ func (db *DB) removeTx(tx *Tx) error {
|
|||
// We are doing this function with the db lock held, which means
|
||||
// we're *not* releasing the db lock, even though we're returning.
|
||||
// This is a weird special case, and probably a bad idea.
|
||||
// go func() {
|
||||
defer db.mu.Unlock()
|
||||
if err := db.checkpoint(); err != nil {
|
||||
db.logger.Errorf("async checkpoint: %v", err)
|
||||
}
|
||||
// }()
|
||||
go func() {
|
||||
defer db.mu.Unlock()
|
||||
if err := db.checkpoint(); err != nil {
|
||||
db.logger.Errorf("async checkpoint: %v", err)
|
||||
}
|
||||
}()
|
||||
} else {
|
||||
db.mu.Unlock()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue