rpuch commented on code in PR #1543:
URL: https://github.com/apache/ignite-3/pull/1543#discussion_r1073361885
##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java:
##########
@@ -251,41 +251,36 @@ public <V> V runConsistently(WriteClosure<V> closure)
throws StorageException {
if (threadLocalWriteBatch.get() != null) {
return closure.execute();
} else {
- if (!busyLock.enterBusy()) {
- throw new StorageClosedException();
- }
-
- try (var writeBatch = new WriteBatchWithIndex()) {
- threadLocalWriteBatch.set(writeBatch);
+ return busy(() -> {
Review Comment:
Aren't we concerned about allocations anymore? Each call to
`runConsistently()` will allocate a `Supplier` index.
If we use it here, should we also use this pattern everywhere (at least, in
all storages)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]