ethdb/pebble: fsync for batch writes (#27522)

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.
This commit is contained in:
Martin Holst Swende 2023-06-21 12:08:12 -04:00 committed by GitHub
parent 6d2aeb43d5
commit 713fc8bbe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.