Skip to content

Commit

Permalink
Cleanup IndicesService#CacheCleaner Scheduling (#42060) (#43528)
Browse files Browse the repository at this point in the history
* Follow up to #42016
  • Loading branch information
original-brownbear authored Jun 25, 2019
1 parent 3d5e457 commit 62a2892
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
import org.elasticsearch.common.util.iterable.Iterables;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
Expand Down Expand Up @@ -1226,13 +1225,7 @@ public void run() {
}
// Reschedule itself to run again if not closed
if (closed.get() == false) {
try {
threadPool.schedule(this, interval, ThreadPool.Names.SAME);
} catch (EsRejectedExecutionException e) {
if (closed.get() == false) {
throw e;
}
}
threadPool.scheduleUnlessShuttingDown(interval, ThreadPool.Names.SAME, this);
}
}

Expand Down

0 comments on commit 62a2892

Please sign in to comment.