Remove unnecessary early-out in MetaDataMappingService#executeRefresh
This commit removes a simple early-out check in MetaDataMappingService#executeRefresh. The early-out is unnecessary because the cluster state task execution framework will not invoke ClusterStateTaskExecutor#execute if the list of tasks is empty.
This commit is contained in:
parent
310e98f51d
commit
d1fd1fb908
|
@ -90,10 +90,6 @@ public class MetaDataMappingService extends AbstractComponent {
|
|||
* and generate a single cluster change event out of all of those.
|
||||
*/
|
||||
ClusterState executeRefresh(final ClusterState currentState, final List<RefreshTask> allTasks) throws Exception {
|
||||
if (allTasks.isEmpty()) {
|
||||
return currentState;
|
||||
}
|
||||
|
||||
// break down to tasks per index, so we can optimize the on demand index service creation
|
||||
// to only happen for the duration of a single index processing of its respective events
|
||||
Map<String, List<RefreshTask>> tasksPerIndex = new HashMap<>();
|
||||
|
|
Loading…
Reference in New Issue