Skip to content

Commit

Permalink
Merge pull request #623 from fuweid/add-failpoint-when-sync
Browse files Browse the repository at this point in the history
Add failpoint when sync
  • Loading branch information
ahrtr authored Nov 26, 2023
2 parents 231772f + 445a07b commit d630253
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit d630253

Please sign in to comment.