You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/28 20:32:26 UTC

[GitHub] [flink] qinjunjerry opened a new pull request #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

qinjunjerry opened a new pull request #17597:
URL: https://github.com/apache/flink/pull/17597


   ## What is the purpose of the change
   
   Sometimes, a user overrides AsyncFunction#timeout() with an empty method or with only logging code. This causes the timeout does not signal back to the framework and job stuck especially when using orderedWait(). This change to make the doc clear on this.
   
   ## Brief change log
   
     - updated the doc to make it clear
   
   ## Verifying this change
   
   This change is a trivial doc improvement.
   
   ## 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] gaoyunhaii commented on a change in pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on a change in pull request #17597:
URL: https://github.com/apache/flink/pull/17597#discussion_r758320100



##########
File path: docs/content.zh/docs/dev/datastream/operators/asyncio.md
##########
@@ -174,6 +174,8 @@ val resultStream: DataStream[(String, String)] =
 
 当异步 I/O 请求超时的时候,默认会抛出异常并重启作业。
 如果你想处理超时,可以重写 `AsyncFunction#timeout` 方法。
+重写`AsyncFunction#timeout`时别忘了调用`ResultFuture.complete()` 或者 `ResultFuture.completeExceptionally()`

Review comment:
       We might also add space between the Chinese and the english words~




-- 
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 edited a comment on pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=27212",
       "triggerID" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 092334cdf65ef2db2e3d8f464a543f98763a6ec1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610) 
   * 96c210839148d67b7fca9d7c47bd37190d1b87b9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=27212) 
   
   <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] flinkbot edited a comment on pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=27212",
       "triggerID" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 96c210839148d67b7fca9d7c47bd37190d1b87b9 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=27212) 
   
   <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] flinkbot commented on pull request #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954184905


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 092334cdf65ef2db2e3d8f464a543f98763a6ec1 (Thu Oct 28 20:35:37 UTC 2021)
   
    ✅no warnings
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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] flinkbot edited a comment on pull request #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 092334cdf65ef2db2e3d8f464a543f98763a6ec1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610) 
   
   <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] qinjunjerry commented on a change in pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
qinjunjerry commented on a change in pull request #17597:
URL: https://github.com/apache/flink/pull/17597#discussion_r758339577



##########
File path: docs/content.zh/docs/dev/datastream/operators/asyncio.md
##########
@@ -174,6 +174,8 @@ val resultStream: DataStream[(String, String)] =
 
 当异步 I/O 请求超时的时候,默认会抛出异常并重启作业。
 如果你想处理超时,可以重写 `AsyncFunction#timeout` 方法。
+重写`AsyncFunction#timeout`时别忘了调用`ResultFuture.complete()` 或者 `ResultFuture.completeExceptionally()`

Review comment:
       Added.

##########
File path: docs/content/docs/dev/datastream/operators/asyncio.md
##########
@@ -194,6 +194,8 @@ The following two parameters control the asynchronous operations:
 
 When an async I/O request times out, by default an exception is thrown and job is restarted.
 If you want to handle timeouts, you can override the `AsyncFunction#timeout` method.
+Make sure you call `ResultFuture.complete()` or `ResultFuture.completeExceptionally()` when overriding

Review comment:
       Added




-- 
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] AHeise commented on a change in pull request #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
AHeise commented on a change in pull request #17597:
URL: https://github.com/apache/flink/pull/17597#discussion_r758314322



##########
File path: docs/content/docs/dev/datastream/operators/asyncio.md
##########
@@ -194,6 +194,8 @@ The following two parameters control the asynchronous operations:
 
 When an async I/O request times out, by default an exception is thrown and job is restarted.
 If you want to handle timeouts, you can override the `AsyncFunction#timeout` method.
+Make sure you call `ResultFuture.complete()` or `ResultFuture.completeExceptionally()` when overriding

Review comment:
       Should we explicitly point out `complete(Collections.emptyList())` in case the user does not want to emit any record?




-- 
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] AHeise commented on pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
AHeise commented on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-986935506


   Could you please also create a backport to 1.14 and 1.13. Please squash the commits; I forgot to check it here :/


-- 
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 edited a comment on pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "96c210839148d67b7fca9d7c47bd37190d1b87b9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 092334cdf65ef2db2e3d8f464a543f98763a6ec1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610) 
   * 96c210839148d67b7fca9d7c47bd37190d1b87b9 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] qinjunjerry commented on a change in pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
qinjunjerry commented on a change in pull request #17597:
URL: https://github.com/apache/flink/pull/17597#discussion_r758321643



##########
File path: docs/content/docs/dev/datastream/operators/asyncio.md
##########
@@ -194,6 +194,8 @@ The following two parameters control the asynchronous operations:
 
 When an async I/O request times out, by default an exception is thrown and job is restarted.
 If you want to handle timeouts, you can override the `AsyncFunction#timeout` method.
+Make sure you call `ResultFuture.complete()` or `ResultFuture.completeExceptionally()` when overriding

Review comment:
       Did not know that. Let me check.




-- 
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] qinjunjerry commented on a change in pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
qinjunjerry commented on a change in pull request #17597:
URL: https://github.com/apache/flink/pull/17597#discussion_r758321029



##########
File path: docs/content.zh/docs/dev/datastream/operators/asyncio.md
##########
@@ -174,6 +174,8 @@ val resultStream: DataStream[(String, String)] =
 
 当异步 I/O 请求超时的时候,默认会抛出异常并重启作业。
 如果你想处理超时,可以重写 `AsyncFunction#timeout` 方法。
+重写`AsyncFunction#timeout`时别忘了调用`ResultFuture.complete()` 或者 `ResultFuture.completeExceptionally()`

Review comment:
       Thanks for reviewing. Will add.




-- 
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] AHeise merged pull request #17597: [FLINK-24686][doc] Make doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
AHeise merged pull request #17597:
URL: https://github.com/apache/flink/pull/17597


   


-- 
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 #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 092334cdf65ef2db2e3d8f464a543f98763a6ec1 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] flinkbot edited a comment on pull request #17597: [FLINK-24686][doccMake doc clear on AsyncFunction#timeout() overriding

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17597:
URL: https://github.com/apache/flink/pull/17597#issuecomment-954182107


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610",
       "triggerID" : "092334cdf65ef2db2e3d8f464a543f98763a6ec1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 092334cdf65ef2db2e3d8f464a543f98763a6ec1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25610) 
   
   <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