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 2020/01/08 06:07:49 UTC

[GitHub] [flink] becketqin opened a new pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

becketqin opened a new pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794
 
 
   …KafkaITCase to avoid intermittent test failure.
   
   ## What is the purpose of the change
   Kafka IT case produces messages without enabling idempotence for `KafkaProducer`. This may cause occasional failure in some tests with duplication check. This patch enables idempotent Kafka producer.
   
   ## Brief change log
   Enable idempotent Kafka producer in KafkaITCase.
   
   
   ## Verifying this change
   This change fixes an existing test case, i.e. KafkaITCase.
   
   ## 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: (yes / no / don't know)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571913385
 
 
   <!--
   Meta data
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:MANUAL TriggerID:571919701
   -->
   ## CI report:
   
   * df73f505165e0f64756c396403d8738b3ae07bcc Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143514690) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178) 
   
   <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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-573092217
 
 
   Merged.
   master: f0f9343a35ff21017e2406614b34a9b1f2712330
   release-1.10: a1ba3f98c400fbad0d9719b251470f0c00a51db3

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571913385
 
 
   <!--
   Meta data
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   -->
   ## CI report:
   
   * df73f505165e0f64756c396403d8738b3ae07bcc 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571905924
 
 
   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 df73f505165e0f64756c396403d8738b3ae07bcc (Wed Jan 08 06:10:23 UTC 2020)
   
   **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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571905914
 
 
   @pnowojski Will you have time to take a quick look? Thanks.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571913385
 
 
   <!--
   Meta data
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:MANUAL TriggerID:571919701
   -->
   ## CI report:
   
   * df73f505165e0f64756c396403d8738b3ae07bcc Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143514690) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178) 
   
   <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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
becketqin commented on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571919701
 
 
   @flinkbot run travis

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] becketqin closed pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
becketqin closed pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] pnowojski commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
pnowojski commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#discussion_r364164729
 
 

 ##########
 File path: flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/testutils/DataGenerators.java
 ##########
 @@ -104,6 +104,8 @@ public void cancel() {
 		if (secureProps != null) {
 			props.putAll(testServer.getSecureProperties());
 		}
+		// Ensure the producer enables idempotence.
+		props.putAll(testServer.getIdempotentProducerConfig());
 
 Review comment:
   Is this the only place where we should be using `enable.idempotence`? 
   
   Do I remember correctly that `enable.idempotence` is automatically/effectively set to true when using transactional kafka producer?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#issuecomment-571913385
 
 
   <!--
   Meta data
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:PUSH TriggerID:df73f505165e0f64756c396403d8738b3ae07bcc
   Hash:df73f505165e0f64756c396403d8738b3ae07bcc Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/143514690 TriggerType:MANUAL TriggerID:571919701
   -->
   ## CI report:
   
   * df73f505165e0f64756c396403d8738b3ae07bcc Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/143514690) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4178) 
   
   <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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] becketqin commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

Posted by GitBox <gi...@apache.org>.
becketqin commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#discussion_r364519578
 
 

 ##########
 File path: flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/testutils/DataGenerators.java
 ##########
 @@ -104,6 +104,8 @@ public void cancel() {
 		if (secureProps != null) {
 			props.putAll(testServer.getSecureProperties());
 		}
+		// Ensure the producer enables idempotence.
+		props.putAll(testServer.getIdempotentProducerConfig());
 
 Review comment:
   Yes, you are right. The idempotence will be enabled if `transactional.id` is set. But our KafkaITCase is using AT_LEAST_ONCE semantic without enabling checkpoint, so by default a non-transactional producer will be instantiated, which will remove the `transactional.id` config. 
   https://github.com/apache/flink/blob/bd56224c3063fd23d508a4250e5698d4840fa488/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java#L1155
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services