Skip to content

Commit 6ec497d

Browse files
Merge pull request #376 from OffchainLabs/pebble-no-sync
add SyncMode option to PebbleExtraOptions
2 parents de229c2 + 94f175d commit 6ec497d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ethdb/pebble/extraoptions.go

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package pebble
33
import "time"
44

55
type ExtraOptions struct {
6+
SyncMode bool
67
BytesPerSync int
78
L0CompactionFileThreshold int
89
L0CompactionThreshold int

ethdb/pebble/pebble.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func New(file string, cache int, handles int, namespace string, readonly bool, e
238238
fn: file,
239239
log: logger,
240240
quitChan: make(chan chan error),
241-
writeOptions: &pebble.WriteOptions{Sync: !ephemeral},
241+
writeOptions: &pebble.WriteOptions{Sync: !ephemeral && extraOptions.SyncMode},
242242
}
243243
opt := &pebble.Options{
244244
// Pebble has a single combined cache area and the write

0 commit comments

Comments
 (0)