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/08/10 13:51:29 UTC

[GitHub] [flink] rkhachatryan opened a new pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

rkhachatryan opened a new pull request #13110:
URL: https://github.com/apache/flink/pull/13110


   ## What is the purpose of the change
   
   Fix of FLINK-18821 for FLINK-1.11 release (similar to #13067 for 1.12).
   
   Currently, an exception in `PartitionRequestClientFactory` is propagated to the client directly. 
   The future in the internal `PartitionRequestClientFactory` map is not completed exceptionally.
   This causes subsequent calls to wait indefinitely for the future to complete (see FLINK-18821).
   
   This PR fixes it by completing the future exceptionally in case of error.
   
   ## Verifying this change
   
   Added unit test: `PartitionRequestClientFactoryTest.testFailureReportedToSubsequentRequests`
   
   ## 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/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? no
   


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



[GitHub] [flink] rkhachatryan commented on a change in pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClientFactoryTest.java
##########
@@ -49,6 +51,18 @@
 
 	private final static int SERVER_PORT = NetUtils.getAvailablePort();
 
+	// see https://issues.apache.org/jira/browse/FLINK-18821
+	@Test(expected = IOException.class)
+	public void testFailureReportedToSubsequentRequests() throws Exception {
+		PartitionRequestClientFactory factory = new PartitionRequestClientFactory(new FailingNettyClient());
+		try {
+			factory.createPartitionRequestClient(new ConnectionID(new InetSocketAddress(InetAddress.getLocalHost(), 8080), 0));
+		} catch (IOException e) {
+			// expected
+		}
+		factory.createPartitionRequestClient(new ConnectionID(new InetSocketAddress(InetAddress.getLocalHost(), 8080), 0));

Review comment:
       You're right, but I think it's not very important in tests and 1.11.




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



[GitHub] [flink] flinkbot commented on pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "afc114a64db9d1e5a99e7277fc032109673c6613",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "afc114a64db9d1e5a99e7277fc032109673c6613",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * afc114a64db9d1e5a99e7277fc032109673c6613 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



[GitHub] [flink] zhijiangW merged pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


   


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



[GitHub] [flink] flinkbot edited a comment on pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


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



[GitHub] [flink] zhijiangW commented on a change in pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClientFactoryTest.java
##########
@@ -49,6 +51,18 @@
 
 	private final static int SERVER_PORT = NetUtils.getAvailablePort();
 
+	// see https://issues.apache.org/jira/browse/FLINK-18821
+	@Test(expected = IOException.class)
+	public void testFailureReportedToSubsequentRequests() throws Exception {
+		PartitionRequestClientFactory factory = new PartitionRequestClientFactory(new FailingNettyClient());
+		try {
+			factory.createPartitionRequestClient(new ConnectionID(new InetSocketAddress(InetAddress.getLocalHost(), 8080), 0));
+		} catch (IOException e) {
+			// expected
+		}
+		factory.createPartitionRequestClient(new ConnectionID(new InetSocketAddress(InetAddress.getLocalHost(), 8080), 0));

Review comment:
       nit: define the local `connectionId` for above two places. 
   It is up to you whether to adjust it. I am also fine with current way.




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



[GitHub] [flink] flinkbot edited a comment on pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


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



[GitHub] [flink] rkhachatryan commented on pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


   Thanks for reviewing and merging!


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



[GitHub] [flink] flinkbot commented on pull request #13110: [FLINK-18821][network] Fix indefinite wait in PartitionRequestClientFactory.createPartitionRequestClient - 1.11

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


   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 90bcc57e06e08131d3187bc5e3fd6c5fc4030de4 (Mon Aug 10 13:54:15 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