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/09/24 12:00:04 UTC

[GitHub] [flink] fapaul opened a new pull request #17351: Flink 24371

fapaul opened a new pull request #17351:
URL: https://github.com/apache/flink/pull/17351


   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
    Before this change, if no committer was after the SinkWriter in the pipeline preCommit was never called. With this change, preCommit is now called as well but the return values are discarded as before.
   
   
   ## Brief change log
   
     - Call the passed lambda in NoopCommitHandler 
   
   
   ## Verifying this change
   
   - Added a test to ensure that preCommit is called if the Sink is configured without a commiter
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   


-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481) 
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] fapaul commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-core/src/main/java/org/apache/flink/api/connector/sink/SinkWriter.java
##########
@@ -63,6 +63,9 @@ default void writeWatermark(Watermark watermark) throws IOException, Interrupted
      *
      * <p>This will be called before we checkpoint the Writer's state in Streaming execution mode.
      *
+     * <p>In case the sink implements a 1-phase commit protocol, this method should trigger the

Review comment:
       No worries, your suggestion definitely provides more information about the committer writer relation.




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-core/src/main/java/org/apache/flink/api/connector/sink/SinkWriter.java
##########
@@ -63,6 +63,9 @@ default void writeWatermark(Watermark watermark) throws IOException, Interrupted
      *
      * <p>This will be called before we checkpoint the Writer's state in Streaming execution mode.
      *
+     * <p>In case the sink implements a 1-phase commit protocol, this method should trigger the

Review comment:
       I wonder if this is really self-explanatory. How about
   
   ```suggestion
   <p>In case the sink has no explicit committer, this method is still called to allow the writer to implement a 1-phase commit protocol. 
   ```




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 7350eac82ffb3ce58506a6a0f3ae7617edb8c440 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533",
       "triggerID" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 7350eac82ffb3ce58506a6a0f3ae7617edb8c440 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531) 
   * 9e4f50836483f3be9932c01af0ca7125d045e1ba Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] AHeise commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-core/src/main/java/org/apache/flink/api/connector/sink/SinkWriter.java
##########
@@ -63,6 +63,9 @@ default void writeWatermark(Watermark watermark) throws IOException, Interrupted
      *
      * <p>This will be called before we checkpoint the Writer's state in Streaming execution mode.
      *
+     * <p>In case the sink implements a 1-phase commit protocol, this method should trigger the

Review comment:
       Sorry for being nitty, but I'd like to have the interfaces in good shape.




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 7350eac82ffb3ce58506a6a0f3ae7617edb8c440 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531) 
   * 9e4f50836483f3be9932c01af0ca7125d045e1ba UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533",
       "triggerID" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 7350eac82ffb3ce58506a6a0f3ae7617edb8c440 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531) 
   * 9e4f50836483f3be9932c01af0ca7125d045e1ba Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] AHeise commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
 
     @Override
     public List<Object> processCommittables(
-            SupplierWithException<List<Object>, Exception> committableSupplier) {
+            SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+        committableSupplier.get();

Review comment:
       We should adjust documentation to point out that `prepareCommit = commit` on 1-pc sinks. Except from that, the PR is fine.




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] fapaul commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-core/src/main/java/org/apache/flink/api/connector/sink/SinkWriter.java
##########
@@ -63,6 +63,9 @@ default void writeWatermark(Watermark watermark) throws IOException, Interrupted
      *
      * <p>This will be called before we checkpoint the Writer's state in Streaming execution mode.
      *
+     * <p>In case the sink implements a 1-phase commit protocol, this method should trigger the

Review comment:
       @AHeise I've added this sentence to clarify the usage if the sink only implements a 1-pc.




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
 
     @Override
     public List<Object> processCommittables(
-            SupplierWithException<List<Object>, Exception> committableSupplier) {
+            SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+        committableSupplier.get();

Review comment:
       If we always want to `preCommit`, then please refactor such that `preCommit` is called on call-site (e.g. remove the `Supplier` and directly pass the result.

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
 
     @Override
     public List<Object> processCommittables(
-            SupplierWithException<List<Object>, Exception> committableSupplier) {
+            SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+        committableSupplier.get();

Review comment:
       Why is this needed, what's not working in this way? It feels counter-intuitive to have `preCommit` without `commit`. It seems like I missed a case when I explicitly structured the code to not call `preCommit`.




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   


-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481) 
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521) 
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 7350eac82ffb3ce58506a6a0f3ae7617edb8c440 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24521",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0375153e06386d89f70df2ad9935033c9b1ea696",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24531",
       "triggerID" : "7350eac82ffb3ce58506a6a0f3ae7617edb8c440",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533",
       "triggerID" : "9e4f50836483f3be9932c01af0ca7125d045e1ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0375153e06386d89f70df2ad9935033c9b1ea696 UNKNOWN
   * 9e4f50836483f3be9932c01af0ca7125d045e1ba Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24533) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] fapaul commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
 
     @Override
     public List<Object> processCommittables(
-            SupplierWithException<List<Object>, Exception> committableSupplier) {
+            SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+        committableSupplier.get();

Review comment:
       > Why is this needed, what's not working in this way? It feels counter-intuitive to have `preCommit` without `commit`. It seems like I missed a case when I explicitly structured the code to not call `preCommit`.
   
   AFAICT all async sinks which want to implement at-least-once cannot work currently. They are all built on the assumption that during `preCommit` `mailbox.yield()` is called until all outstanding message callbacks are called but they do not have any transaction-like to commit (no committer). I personally experienced the issue when trying to implement the elasticseach sink.
   
   > If we always want to `preCommit`, then please refactor such that `preCommit` is called on call-site (e.g. remove the `Supplier` and directly pass the result.
   
   Sure can do that 👍 
   
   




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481",
       "triggerID" : "1e785b4db987fa9006c04077a5f5eb2050a338ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "050cc583fbf1a19ec41aad974444cdc6f7c81403",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1e785b4db987fa9006c04077a5f5eb2050a338ab Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=24481) 
   * 050cc583fbf1a19ec41aad974444cdc6f7c81403 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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] AHeise commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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



##########
File path: flink-core/src/main/java/org/apache/flink/api/connector/sink/SinkWriter.java
##########
@@ -63,6 +63,9 @@ default void writeWatermark(Watermark watermark) throws IOException, Interrupted
      *
      * <p>This will be called before we checkpoint the Writer's state in Streaming execution mode.
      *
+     * <p>In case the sink implements a 1-phase commit protocol, this method should trigger the

Review comment:
       I wonder if this is really self-explanatory. How about
   
   ```suggestion
        * <p>In case the sink has no explicit committer, this method is still called to allow the writer to implement a 1-phase commit protocol. 
   ```




-- 
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 #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   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 1e785b4db987fa9006c04077a5f5eb2050a338ab (Fri Sep 24 12:04:10 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <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] AHeise merged pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available

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


   


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