You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wanglijie95 (via GitHub)" <gi...@apache.org> on 2023/04/07 02:18:30 UTC

[GitHub] [flink] wanglijie95 opened a new pull request, #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

wanglijie95 opened a new pull request, #22367:
URL: https://github.com/apache/flink/pull/22367

   ## What is the purpose of the change
   
   Currently, there are two versions of FutureUtils.orTimeout() that use null as an error message when the timeout happens. This makes it difficult to debug those timeouts, in particular during the shutdown. See [this](https://lists.apache.org/thread/5wxv2occohc6ky1g754n7o8b8ssjcqf5) thread for example.
   
    Replacing null with an actual message ease improve the debugging.
   
   ## Verifying this change
   This pr only changes the logging when timeouts happens, no need for extra tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (**no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**no**)
     - The serializers: (**no**)
     - The runtime per-record code paths (performance sensitive): (**no**)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (**no**)
     - The S3 file system connector: (**no**)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**no**)
     - If yes, how is the feature documented? (**not applicable**)
   


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] wanglijie95 closed pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 closed pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout
URL: https://github.com/apache/flink/pull/22367


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] wanglijie95 commented on pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on PR #22367:
URL: https://github.com/apache/flink/pull/22367#issuecomment-1507041121

   Squash commits. Merged % CI green.


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] flinkbot commented on pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22367:
URL: https://github.com/apache/flink/pull/22367#issuecomment-1499860845

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "5432ca4507169c8e39f19d7e7aa741002ab7fd7e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "5432ca4507169c8e39f19d7e7aa741002ab7fd7e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5432ca4507169c8e39f19d7e7aa741002ab7fd7e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] reswqa commented on a diff in pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa commented on code in PR #22367:
URL: https://github.com/apache/flink/pull/22367#discussion_r1163942931


##########
flink-core/src/test/java/org/apache/flink/util/concurrent/FutureUtilsTest.java:
##########
@@ -294,7 +294,7 @@ public void testOrTimeout() throws Exception {
         final CompletableFuture<String> future = new CompletableFuture<>();
         final long timeout = 10L;
 
-        FutureUtils.orTimeout(future, timeout, TimeUnit.MILLISECONDS);
+        FutureUtils.orTimeout(future, timeout, TimeUnit.MILLISECONDS, "testOrTimeout");
 
         try {
             future.get();

Review Comment:
   We'd better also check the message of `TimeoutException`.



##########
flink-tests/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorEventSendingCheckpointITCase.java:
##########
@@ -259,7 +259,12 @@ public Long map(Long value) throws Exception {
 
     private static CompletableFuture<Acknowledge> askTimeoutFuture() {
         final CompletableFuture<Acknowledge> future = new CompletableFuture<>();
-        FutureUtils.orTimeout(future, 500, TimeUnit.MILLISECONDS);
+        long timeout = 500;

Review Comment:
   Can be final.



-- 
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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] wanglijie95 commented on a diff in pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on code in PR #22367:
URL: https://github.com/apache/flink/pull/22367#discussion_r1165289123


##########
flink-core/src/test/java/org/apache/flink/util/concurrent/FutureUtilsTest.java:
##########
@@ -294,7 +294,7 @@ public void testOrTimeout() throws Exception {
         final CompletableFuture<String> future = new CompletableFuture<>();
         final long timeout = 10L;
 
-        FutureUtils.orTimeout(future, timeout, TimeUnit.MILLISECONDS);
+        FutureUtils.orTimeout(future, timeout, TimeUnit.MILLISECONDS, "testOrTimeout");
 
         try {
             future.get();

Review Comment:
   Added



##########
flink-tests/src/test/java/org/apache/flink/runtime/operators/coordination/OperatorEventSendingCheckpointITCase.java:
##########
@@ -259,7 +259,12 @@ public Long map(Long value) throws Exception {
 
     private static CompletableFuture<Acknowledge> askTimeoutFuture() {
         final CompletableFuture<Acknowledge> future = new CompletableFuture<>();
-        FutureUtils.orTimeout(future, 500, TimeUnit.MILLISECONDS);
+        long timeout = 500;

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: issues-unsubscribe@flink.apache.org

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


[GitHub] [flink] wanglijie95 commented on pull request #22367: [FLINK-27144][runtime] Provide timeout details when calling FutureUtils.orTimeout

Posted by "wanglijie95 (via GitHub)" <gi...@apache.org>.
wanglijie95 commented on PR #22367:
URL: https://github.com/apache/flink/pull/22367#issuecomment-1506673974

   Thanks for review @reswqa. I 've updated this PR, PTAL.


-- 
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: issues-unsubscribe@flink.apache.org

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