Commit c170b12
authored
Do not allow batch to be reused after commit (#67)
By explicitly not allowing the Batch to be reused, the Batch resources can be recycled, after Commit is called, for use in a new Batch.
In general, a Batch should not be reuesd for this or any other datastore becuase it is not guaranteed to be safely reusable for all datastores. Therefore, making this Batch explicitly not reusable allows better resource management as well as returning a clear error when the Batch is mistakenly reused.1 parent 869f660 commit c170b12
2 files changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
419 | 420 | | |
420 | 421 | | |
421 | 422 | | |
| 423 | + | |
| 424 | + | |
422 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
| |||
428 | 434 | | |
429 | 435 | | |
430 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
431 | 440 | | |
432 | 441 | | |
433 | 442 | | |
| |||
436 | 445 | | |
437 | 446 | | |
438 | 447 | | |
439 | | - | |
440 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
441 | 458 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | | - | |
| 162 | + | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| |||
0 commit comments