Skip to content
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