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/09 07:49:08 UTC

[GitHub] [ignite-3] sanpwc opened a new pull request, #1429: IGNITE-17976 Correct exception is thrown on KeyValueView#get in case of lost majority

sanpwc opened a new pull request, #1429:
URL: https://github.com/apache/ignite-3/pull/1429

   https://issues.apache.org/jira/browse/IGNITE-17976


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


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

Posted by GitBox <gi...@apache.org>.
sanpwc commented on code in PR #1429:
URL: https://github.com/apache/ignite-3/pull/1429#discussion_r1050839247


##########
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:
   AFAIK, we should only check that it's possible to create table after node stop.



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


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

Posted by GitBox <gi...@apache.org>.
sanpwc merged PR #1429:
URL: https://github.com/apache/ignite-3/pull/1429


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


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

Posted by GitBox <gi...@apache.org>.
sanpwc commented on code in PR #1429:
URL: https://github.com/apache/ignite-3/pull/1429#discussion_r1050840213


##########
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:
   I don't think so, because several different causes are possible: ReplicationTimeout, TimeoutException, ReplicaUnavailable, ConnectRefuse, etc.



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


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

Posted by GitBox <gi...@apache.org>.
sanpwc commented on code in PR #1429:
URL: https://github.com/apache/ignite-3/pull/1429#discussion_r1050844351


##########
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:
   Fixed.



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


[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

Posted by GitBox <gi...@apache.org>.
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