Use ThreadPool.Names.SAME executor in stats and service apis.

Original commit: elastic/x-pack-elasticsearch@03c52668e0
This commit is contained in:
Martijn van Groningen 2015-05-13 10:44:15 +02:00
parent f14fe49dfa
commit af1d4ad79c
2 changed files with 4 additions and 2 deletions

View File

@ -35,7 +35,8 @@ public class TransportWatcherServiceAction extends WatcherTransportAction<Watche
@Override
protected String executor() {
return ThreadPool.Names.MANAGEMENT;
// We should always be able to stop or restart the watcher service, even if the a TP is exhausted, so don't fork into another thread:
return ThreadPool.Names.SAME;
}
@Override

View File

@ -42,7 +42,8 @@ public class TransportWatcherStatsAction extends WatcherTransportAction<WatcherS
@Override
protected String executor() {
return ThreadPool.Names.MANAGEMENT;
// cheap operation, no need to fork into another thread
return ThreadPool.Names.SAME;
}
@Override