You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by kk...@apache.org on 2019/07/15 12:20:32 UTC
[flink] 04/04: [hotfix][runtime] SynchronousSavepointLatch: check
completion condition in the blocking method in case of spurious wakeups
This is an automated email from the ASF dual-hosted git repository.
kkloudas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 0c8c1d4b827700d788f5b4ddbd8a21192165d039
Author: Aleksey Pak <al...@ververica.com>
AuthorDate: Wed Jul 10 17:17:05 2019 +0200
[hotfix][runtime] SynchronousSavepointLatch: check completion condition in the blocking method in case of spurious wakeups
---
.../streaming/runtime/tasks/SynchronousSavepointLatch.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SynchronousSavepointLatch.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SynchronousSavepointLatch.java
index d10c19c..a6a583d 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SynchronousSavepointLatch.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SynchronousSavepointLatch.java
@@ -66,11 +66,13 @@ class SynchronousSavepointLatch {
}
}
- void blockUntilCheckpointIsAcknowledged() throws Exception {
+ void blockUntilCheckpointIsAcknowledged() throws InterruptedException {
synchronized (synchronizationPoint) {
- if (completionResult == null && isSet()) {
- waiting = true;
- synchronizationPoint.wait();
+ if (isSet()) {
+ while (completionResult == null) {
+ waiting = true;
+ synchronizationPoint.wait();
+ }
waiting = false;
}
}