Skip to content

Commit

Permalink
ethdb/pebble: fsync for batch writes (ethereum#27522)
Browse files Browse the repository at this point in the history
This is likely the culprit behind several data corruption issues, e.g. where data has been
written to the freezer, but the deletion from pebble does not go through due to process
crash.
  • Loading branch information
holiman authored and spencer-tb committed Jul 7, 2023
1 parent cdcbd60 commit ceb022d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethdb/pebble/pebble.go
Expand Up @@ -535,7 +535,7 @@ func (b *batch) Write() error {
if b.db.closed {
return pebble.ErrClosed
}
return b.b.Commit(pebble.NoSync)
return b.b.Commit(pebble.Sync)
}

// Reset resets the batch for reuse.
Expand Down

0 comments on commit ceb022d

Please sign in to comment.