You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2023/01/18 10:41:57 UTC

[GitHub] [ignite-3] rpuch commented on a diff in pull request #1543: IGNITE-18566 Fix busyLock usage in RocksDbTableStorage and related

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org