hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [50/50] [abbrv] hbase git commit: Revert "Revert "HBASE-14922 Delayed flush doesn't work causing flush storms; addendum by Lars Hofhansl"" Push again but with right JIRA number this time.
Date Mon, 07 Dec 2015 16:56:27 GMT
Revert "Revert "HBASE-14922 Delayed flush doesn't work causing flush storms; addendum by Lars
Hofhansl""
Push again but with right JIRA number this time.

This reverts commit 9fb53d07c418002c8a03be1e7e664e094f304ba5.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8bf70144
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8bf70144
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8bf70144

Branch: refs/heads/hbase-12439
Commit: 8bf70144e40650ef972f005e2465bd0e2a087c40
Parents: 9fb53d0
Author: stack <stack@apache.org>
Authored: Sat Dec 5 14:30:25 2015 -0800
Committer: stack <stack@apache.org>
Committed: Sat Dec 5 14:30:25 2015 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8bf70144/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java
b/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java
index ca15286..7e7239e 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/JitterScheduledThreadPoolExecutorImpl.java
@@ -81,7 +81,8 @@ public class JitterScheduledThreadPoolExecutorImpl extends ScheduledThreadPoolEx
     public long getDelay(TimeUnit unit) {
       long baseDelay = wrapped.getDelay(unit);
       long spreadTime = (long) (baseDelay * spread);
-      long delay = baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime);
+      long delay = spreadTime <= 0 ? baseDelay
+          : baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime);
       // Ensure that we don't roll over for nanoseconds.
       return (delay < 0) ? baseDelay : delay;
     }


Mime
View raw message