Revert "HBASE-1422 Delayed flush doesn't work causing flush storms; addendum by Lars Hofhansl"

Revert because pushed with wrong JIRA number

This reverts commit b1462679e1.
This commit is contained in:
stack 2015-12-05 14:30:05 -08:00
parent b1462679e1
commit 9fb53d07c4
1 changed files with 1 additions and 2 deletions

View File

@ -81,8 +81,7 @@ public class JitterScheduledThreadPoolExecutorImpl extends ScheduledThreadPoolEx
public long getDelay(TimeUnit unit) {
long baseDelay = wrapped.getDelay(unit);
long spreadTime = (long) (baseDelay * spread);
long delay = spreadTime <= 0 ? baseDelay
: baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime);
long delay = baseDelay + ThreadLocalRandom.current().nextLong(-spreadTime, spreadTime);
// Ensure that we don't roll over for nanoseconds.
return (delay < 0) ? baseDelay : delay;
}