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 2022/08/09 15:44:44 UTC

[GitHub] [ignite-3] tkalkirill commented on a diff in pull request #994: IGNITE-17500 Fix minor issues in RocksDB-based partition storages

tkalkirill commented on code in PR #994:
URL: https://github.com/apache/ignite-3/pull/994#discussion_r941506118


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java:
##########
@@ -193,11 +193,9 @@ public <V> V runConsistently(WriteClosure<V> closure) throws StorageException {
     /** {@inheritDoc} */
     @Override
     public CompletableFuture<Void> flush() {
-        CompletableFuture<Void> flushFuture = new CompletableFuture<>();
-
-        CompletableFuture<Void> oldFuture = flushFuturesByAppliedIndex.put(lastAppliedIndex, flushFuture);
-
-        assert oldFuture == null;
+        CompletableFuture<Void> flushFuture = flushFuturesByAppliedIndex.computeIfAbsent(

Review Comment:
   Why did you remove the assert?



##########
modules/storage-rocksdb/src/test/java/org/apache/ignite/internal/storage/rocksdb/RocksDbTableStorageTest.java:
##########
@@ -246,7 +248,8 @@ void storageAdvertisesItIsPersistent() {
         assertThat(storage.isVolatile(), is(false));
     }
 
-    private IgniteBiTuple<TestKey, TestValue> unwrap(BinaryRow binaryRow) {
+    @Nullable
+    private static IgniteBiTuple<TestKey, TestValue> unwrap(@Nullable BinaryRow binaryRow) {

Review Comment:
   ```suggestion
       private static @Nullable IgniteBiTuple<TestKey, TestValue> unwrap(@Nullable BinaryRow binaryRow) {
   ```



-- 
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