Skip to content

Commit

Permalink
db: document Batch as unsafe for concurrent access
Browse files Browse the repository at this point in the history
Fix #1758.
  • Loading branch information
jbowens committed Jun 13, 2022
1 parent 9a8e474 commit 4a952c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ func (d DeferredBatchOp) Finish() error {
// RangeKeyUnsets, and/or RangeKeyDeletes that are applied atomically. Batch
// implements the Reader interface, but only an indexed batch supports reading
// (without error) via Get or NewIter. A non-indexed batch will return
// ErrNotIndexed when read from .
// ErrNotIndexed when read from. A batch is not safe for concurrent use, and
// consumers should use a batch per goroutine or provide their own
// synchronization.
//
// Indexing
//
Expand Down

0 comments on commit 4a952c0

Please sign in to comment.