Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SyncMode option to PebbleExtraOptions #376

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll feel better if our default will stay "on" and we could later think if the logic that goes for geth turning it off also fits us

writeOptions: &pebble.WriteOptions{Sync: !ephemeral && extraOptions.SyncMode},
}
opt := &pebble.Options{
// Pebble has a single combined cache area and the write
Expand Down
Loading