Skip to content

Commit 779b962

Browse files
authored
Document not to reuse batch (#258)
1 parent 670a127 commit 779b962

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

datastore.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,5 +277,9 @@ func GetBackedSize(ctx context.Context, ds Read, key Key) (int, error) {
277277
type Batch interface {
278278
Write
279279

280+
// Commit applies the write operations to the datastore.
281+
//
282+
// A Batch should not be used after calling Commit. A new Batch must be
283+
// created to perform additional batched operations.
280284
Commit(ctx context.Context) error
281285
}

0 commit comments

Comments
 (0)