You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2020/02/14 17:31:15 UTC

[flink-statefun] 10/11: fixup! [FLINK-15956] Add an exponential backoff

This is an automated email from the ASF dual-hosted git repository.

sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-statefun.git

commit f3a9bd5664e56e566d9cd299f351d631d65a7766
Author: Igal Shilman <ig...@gmail.com>
AuthorDate: Fri Feb 14 18:00:32 2020 +0100

    fixup! [FLINK-15956] Add an exponential backoff
---
 .../flink/statefun/flink/core/backpressure/SystemNanoTimer.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/backpressure/SystemNanoTimer.java b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/backpressure/SystemNanoTimer.java
index 3eaefe3..717c2df 100644
--- a/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/backpressure/SystemNanoTimer.java
+++ b/statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/backpressure/SystemNanoTimer.java
@@ -41,10 +41,8 @@ final class SystemNanoTimer implements Timer {
       final long sleepTimeMs = NANOSECONDS.toMillis(sleepTimeNanos);
       Thread.sleep(sleepTimeMs);
     } catch (InterruptedException ex) {
-      if (Thread.interrupted()) {
-        Thread.currentThread().interrupt();
-        throw new RuntimeException("interrupted while sleeping", ex);
-      }
+      Thread.currentThread().interrupt();
+      throw new RuntimeException("interrupted while sleeping", ex);
     }
   }
 }