File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
main/java/org/elasticsearch/common/util/concurrent
test/java/org/elasticsearch/common/util/concurrent Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments