mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-07-15 00:28:30 +00:00
Merge pull request #623 from fuweid/add-failpoint-when-sync
Add failpoint when sync
This commit is contained in:
commit
d630253fcd
2
tx.go
2
tx.go
@ -475,6 +475,7 @@ func (tx *Tx) write() error {
|
||||
|
||||
// Ignore file sync if flag is set on DB.
|
||||
if !tx.db.NoSync || common.IgnoreNoSync {
|
||||
// gofail: var beforeSyncDataPages struct{}
|
||||
if err := fdatasync(tx.db); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -512,6 +513,7 @@ func (tx *Tx) writeMeta() error {
|
||||
return err
|
||||
}
|
||||
if !tx.db.NoSync || common.IgnoreNoSync {
|
||||
// gofail: var beforeSyncMetaPage struct{}
|
||||
if err := fdatasync(tx.db); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user