mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
With too many incoming tasks, reset measurements to 1ns instead of 0ns
Resoves #26332 where too many tasks occurred while adjustment was happening, the measurements were reset to 0, and then an assert failed due to tasks executing in 0 nanoseconds
This commit is contained in:
parent
9c795bd838
commit
fe02350e73
@ -225,7 +225,7 @@ public final class QueueResizingEsThreadPoolExecutor extends EsThreadPoolExecuto
|
|||||||
// - Since taskCount will now be incremented forever, it will never be 10 again,
|
// - Since taskCount will now be incremented forever, it will never be 10 again,
|
||||||
// so there will be no further adjustments
|
// so there will be no further adjustments
|
||||||
logger.debug("[{}]: too many incoming tasks while queue size adjustment occurs, resetting measurements to 0", name);
|
logger.debug("[{}]: too many incoming tasks while queue size adjustment occurs, resetting measurements to 0", name);
|
||||||
totalTaskNanos.getAndSet(0);
|
totalTaskNanos.getAndSet(1);
|
||||||
taskCount.getAndSet(0);
|
taskCount.getAndSet(0);
|
||||||
startNs = System.nanoTime();
|
startNs = System.nanoTime();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user