Cleanup IndicesService#CacheCleaner Scheduling (#42060) (#43528)

* Follow up to #42016
This commit is contained in:
Armin Braun 2019-06-25 13:04:04 +02:00 committed by GitHub
parent 3d5e4577aa
commit 62a28921e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -65,7 +65,6 @@ import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.util.concurrent.AbstractRefCounted; import org.elasticsearch.common.util.concurrent.AbstractRefCounted;
import org.elasticsearch.common.util.concurrent.EsExecutors; 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.util.iterable.Iterables;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.NamedXContentRegistry;
@ -1226,13 +1225,7 @@ public class IndicesService extends AbstractLifecycleComponent
} }
// Reschedule itself to run again if not closed // Reschedule itself to run again if not closed
if (closed.get() == false) { if (closed.get() == false) {
try { threadPool.scheduleUnlessShuttingDown(interval, ThreadPool.Names.SAME, this);
threadPool.schedule(this, interval, ThreadPool.Names.SAME);
} catch (EsRejectedExecutionException e) {
if (closed.get() == false) {
throw e;
}
}
} }
} }