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/12/16 07:49:21 UTC

[GitHub] [ignite-3] alievmirza commented on a diff in pull request #1429: IGNITE-17976 Correct exception is thrown on KeyValueView#get in case of lost majority

alievmirza commented on code in PR #1429:
URL: https://github.com/apache/ignite-3/pull/1429#discussion_r1050444373


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java:
##########
@@ -1324,4 +1338,23 @@ protected CompletableFuture<ClusterNode> evaluateReadOnlyRecipientNode(int partI
             }
         });
     }
+
+    /**
+     * Wraps {@code ReplicationException} or {@code ConnectException} with {@code TransactionException}.

Review Comment:
   Let's use {@link} here



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java:
##########
@@ -813,9 +812,9 @@ public void testOneNodeRestartWithGap() {
 
         assertNotNull(table);
 
-        assertThrowsWithCause(() -> table.keyValueView().get(null, Tuple.create().set("id", 0)), TimeoutException.class);
+        assertThrows(TransactionException.class, () -> table.keyValueView().get(null, Tuple.create().set("id", 0)));

Review Comment:
   Should we check here the cause of an exception?



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java:
##########
@@ -813,9 +812,9 @@ public void testOneNodeRestartWithGap() {
 
         assertNotNull(table);
 
-        assertThrowsWithCause(() -> table.keyValueView().get(null, Tuple.create().set("id", 0)), TimeoutException.class);
+        assertThrows(TransactionException.class, () -> table.keyValueView().get(null, Tuple.create().set("id", 0)));
 
-        createTableWithData(ignite, TABLE_NAME_2, 1, 1);
+        createTableWithoutData(ignite, TABLE_NAME_2, 1, 1);

Review Comment:
   why do we need to change the logic of the test? 



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