Skip to content

Commit

Permalink
Merge pull request #376 from OffchainLabs/pebble-no-sync
Browse files Browse the repository at this point in the history
add SyncMode option to PebbleExtraOptions
  • Loading branch information
joshuacolvin0 authored Dec 20, 2024
2 parents de229c2 + 94f175d commit 6ec497d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ethdb/pebble/extraoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package pebble
import "time"

type ExtraOptions struct {
SyncMode bool
BytesPerSync int
L0CompactionFileThreshold int
L0CompactionThreshold int
Expand Down
2 changes: 1 addition & 1 deletion ethdb/pebble/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func New(file string, cache int, handles int, namespace string, readonly bool, e
fn: file,
log: logger,
quitChan: make(chan chan error),
writeOptions: &pebble.WriteOptions{Sync: !ephemeral},
writeOptions: &pebble.WriteOptions{Sync: !ephemeral && extraOptions.SyncMode},
}
opt := &pebble.Options{
// Pebble has a single combined cache area and the write
Expand Down

0 comments on commit 6ec497d

Please sign in to comment.