Increment tribe node version on updates

Currently the tribe node version always stays 0, which can cause issues for the services that rely on cluster state version. For example, ClusterStateObserver doesn't revalidate the cluster state after change, which leads to cluster health check with wait flags to take much longer then actually needed.
This commit is contained in:
Igor Motov 2015-09-14 22:55:07 -04:00
parent 1998c2ca4d
commit e09e43a325
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ public class TribeService extends AbstractLifecycleComponent<TribeService> {
}
}
return ClusterState.builder(currentState).blocks(blocks).nodes(nodes).metaData(metaData).routingTable(routingTable).build();
return ClusterState.builder(currentState).incrementVersion().blocks(blocks).nodes(nodes).metaData(metaData).routingTable(routingTable).build();
}
private void removeIndex(ClusterBlocks.Builder blocks, MetaData.Builder metaData, RoutingTable.Builder routingTable, IndexMetaData index) {