Skip to content

Commit 0f1f95d

Browse files
committed
PR comments
1 parent 48364c6 commit 0f1f95d

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

server/src/main/java/org/elasticsearch/common/util/concurrent/EsThreadPoolExecutor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public class EsThreadPoolExecutor extends ThreadPoolExecutor {
3131

3232
// noop probe to prevent starvation of work in the work queue due to ForceQueuePolicy
3333
// https://github.com/elastic/elasticsearch/issues/124667
34-
static final Runnable WORKER_PROBE = () -> {};
34+
static final Runnable WORKER_PROBE = new Runnable() {
35+
@Override
36+
public void run() {}
37+
};
3538

3639
private final ThreadContext contextHolder;
3740

server/src/test/java/org/elasticsearch/common/util/concurrent/EsExecutorsTests.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -861,18 +861,10 @@ protected void doRun() {
861861
}
862862

863863
for (int i = 0; i < 20; i++) {
864-
logger.info("--> attempt [{}]", i);
864+
logger.trace("--> attempt [{}]", i);
865865
final var doneLatch = new CountDownLatch(1);
866866
executor.execute(new Task(between(1, 500), doneLatch));
867-
boolean success = false;
868-
try {
869-
safeAwait(doneLatch, TimeValue.ONE_MINUTE);
870-
success = true;
871-
} finally {
872-
if (success == false) {
873-
logger.info("fail");
874-
}
875-
}
867+
safeAwait(doneLatch, TimeValue.ONE_MINUTE);
876868
}
877869
} finally {
878870
ThreadPool.terminate(executor, 1, TimeUnit.SECONDS);

0 commit comments

Comments
 (0)