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

*: avoid variable name conflict with imported package name #3184

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all 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
6 changes: 3 additions & 3 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,8 @@ func (d *DB) applyInternal(batch *Batch, opts *WriteOptions, noSyncWait bool) er
panic(fmt.Sprintf("pebble: batch db mismatch: %p != %p", batch.db, d))
}

sync := opts.GetSync()
if sync && d.opts.DisableWAL {
syncWrite := opts.GetSync()
if syncWrite && d.opts.DisableWAL {
return errors.New("pebble: WAL disabled")
}

Expand Down Expand Up @@ -855,7 +855,7 @@ func (d *DB) applyInternal(batch *Batch, opts *WriteOptions, noSyncWait bool) er
return err
}
}
if err := d.commit.Commit(batch, sync, noSyncWait); err != nil {
if err := d.commit.Commit(batch, syncWrite, noSyncWait); err != nil {
// There isn't much we can do on an error here. The commit pipeline will be
// horked at this point.
d.opts.Logger.Fatalf("pebble: fatal commit error: %v", err)
Expand Down