You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "rpuch (via GitHub)" <gi...@apache.org> on 2025/01/27 07:53:38 UTC
[PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
rpuch opened a new pull request, #5122:
URL: https://github.com/apache/ignite-3/pull/5122
https://issues.apache.org/jira/browse/IGNITE-24313
--
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
Re: [PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
Posted by "sashapolo (via GitHub)" <gi...@apache.org>.
sashapolo commented on code in PR #5122:
URL: https://github.com/apache/ignite-3/pull/5122#discussion_r1930335629
##########
modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/asserts/CompletableFutureAssert.java:
##########
@@ -92,12 +92,18 @@ public static <X extends Throwable> X assertWillThrow(
try {
normalResult = future.get(timeout, timeUnit);
} catch (TimeoutException e) {
- return fail("Expected the future to be completed with an exception of class in time, but it did not");
+ if (expectedExceptionClass.isInstance(e)) {
Review Comment:
Why do we need a separate case for this exception at all?
##########
modules/network/src/test/java/org/apache/ignite/internal/network/DefaultMessagingServiceTest.java:
##########
@@ -525,6 +539,8 @@ private Services createMessagingService(
messagingService.setConnectionManager(connectionManager);
+ messagingService.start();
Review Comment:
Why did this line not exist before?
##########
modules/core/src/main/java/org/apache/ignite/internal/future/timeout/TimeoutObject.java:
##########
@@ -37,4 +38,11 @@ public interface TimeoutObject<T extends CompletableFuture<?>> {
* @return A future.
*/
T future();
+
+ /**
+ * Describes the operation that has time limit. This is used to construct TimeoutException.
+ */
+ default @Nullable String describe() {
Review Comment:
Why not implement it in all inheritors?
--
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
Re: [PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #5122:
URL: https://github.com/apache/ignite-3/pull/5122#discussion_r1930536320
##########
modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/asserts/CompletableFutureAssert.java:
##########
@@ -92,12 +92,18 @@ public static <X extends Throwable> X assertWillThrow(
try {
normalResult = future.get(timeout, timeUnit);
} catch (TimeoutException e) {
- return fail("Expected the future to be completed with an exception of class in time, but it did not");
+ if (expectedExceptionClass.isInstance(e)) {
Review Comment:
To tell that we failed because the future was not completed *in time*, and not just because it failed
--
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
Re: [PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #5122:
URL: https://github.com/apache/ignite-3/pull/5122#discussion_r1930543291
##########
modules/core/src/main/java/org/apache/ignite/internal/future/timeout/TimeoutObject.java:
##########
@@ -37,4 +38,11 @@ public interface TimeoutObject<T extends CompletableFuture<?>> {
* @return A future.
*/
T future();
+
+ /**
+ * Describes the operation that has time limit. This is used to construct TimeoutException.
+ */
+ default @Nullable String describe() {
Review Comment:
There are 3 other implementations. 2 of them are in test and benchmark, so the description is simply not needed; third is in TcpClientChannel, and:
* I've never stumbled upon such timeout exceptions when debugging (so it's not clear why this has to be improved here as well)
* it's not obvious what should be described in this case
That's why I only added an implementation for the network-related timeout object. Later we can add them for other objects if the need arises.
--
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
Re: [PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch commented on code in PR #5122:
URL: https://github.com/apache/ignite-3/pull/5122#discussion_r1930361876
##########
modules/network/src/test/java/org/apache/ignite/internal/network/DefaultMessagingServiceTest.java:
##########
@@ -525,6 +539,8 @@ private Services createMessagingService(
messagingService.setConnectionManager(connectionManager);
+ messagingService.start();
Review Comment:
Probably because we didn't test for timeouts
--
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
Re: [PR] IGNITE-24313 Improve invocation timeout exception message [ignite-3]
Posted by "rpuch (via GitHub)" <gi...@apache.org>.
rpuch merged PR #5122:
URL: https://github.com/apache/ignite-3/pull/5122
--
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