[
https://issues.apache.org/jira/browse/FLINK-10747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673054#comment-16673054
]
ASF GitHub Bot commented on FLINK-10747:
----------------------------------------
tillrohrmann closed pull request #6992: [FLINK-10747] Update
SingleInputGate#requestedPartitionsFlag under lock
URL: https://github.com/apache/flink/pull/6992
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
index 2856ca1c33a..e79387112bf 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
@@ -165,7 +165,7 @@
private boolean hasReceivedAllEndOfPartitionEvents;
/** Flag indicating whether partitions have been requested. */
- private boolean requestedPartitionsFlag;
+ private volatile boolean requestedPartitionsFlag;
/** Flag indicating whether all resources have been released. */
private volatile boolean isReleased;
@@ -482,23 +482,25 @@ public void requestPartitions() throws IOException,
InterruptedException {
}
synchronized (requestLock) {
- if (isReleased) {
- throw new IllegalStateException("Already
released.");
- }
+ if (!requestedPartitionsFlag) {
+ if (isReleased) {
+ throw new
IllegalStateException("Already released.");
+ }
- // Sanity checks
- if (numberOfInputChannels != inputChannels.size()) {
- throw new IllegalStateException("Bug in input
gate setup logic: mismatch between" +
+ // Sanity checks
+ if (numberOfInputChannels !=
inputChannels.size()) {
+ throw new IllegalStateException("Bug in
input gate setup logic: mismatch between" +
"number of total input channels
and the currently set number of input " +
"channels.");
- }
+ }
- for (InputChannel inputChannel :
inputChannels.values()) {
-
inputChannel.requestSubpartition(consumedSubpartitionIndex);
+ for (InputChannel inputChannel :
inputChannels.values()) {
+
inputChannel.requestSubpartition(consumedSubpartitionIndex);
+ }
+
+ requestedPartitionsFlag = true;
}
}
-
- requestedPartitionsFlag = true;
}
//
------------------------------------------------------------------------
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> CoGroupConnectedComponentsITCase deadlocked on Travis
> -----------------------------------------------------
>
> Key: FLINK-10747
> URL: https://issues.apache.org/jira/browse/FLINK-10747
> Project: Flink
> Issue Type: Bug
> Components: Tests
> Affects Versions: 1.7.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Priority: Blocker
> Labels: pull-request-available, test-stability
> Fix For: 1.7.0
>
>
> The {{CoGroupConnectedComponentsITCase}} deadlocks on Travis:
> https://api.travis-ci.org/v3/job/449230962/log.txt.
> It looks as if the iteration gets stuck and waits
> {{SuperstepKickoffLatch.awaitStartOfSuperstepOrTermination}} without ever
> getting a proper notification. This might indicate a serious bug in our
> iteration implementation. This could also be related to FLINK-10741.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)