Skip to content

Commit 390345f

Browse files
committed
db: fix typo in ApplyNoSyncWait
Fix typo and allow nil options like Apply.
1 parent dff839c commit 390345f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

db.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ func (d *DB) Apply(batch *Batch, opts *WriteOptions) error {
778778
// EXPERIMENTAL: API/feature subject to change. Do not yet use outside
779779
// CockroachDB.
780780
func (d *DB) ApplyNoSyncWait(batch *Batch, opts *WriteOptions) error {
781-
if !opts.Sync {
782-
return errors.Errorf("cannot request asynchonous apply when WriteOptions.Sync is false")
781+
if !opts.GetSync() {
782+
return errors.Errorf("cannot request asynchronous apply when WriteOptions.Sync is false")
783783
}
784784
return d.applyInternal(batch, opts, true)
785785
}

0 commit comments

Comments
 (0)