Added some comments regarding the acknowledgement logic in MetaDataMappingService.putMapping
Made left over cluster state debug log entry less verbose.
This commit is contained in:
parent
e8909396b4
commit
acf17b4e39
|
@ -483,8 +483,8 @@ public class MetaDataMappingService extends AbstractComponent {
|
||||||
|
|
||||||
ClusterState updatedState = newClusterStateBuilder().state(currentState).metaData(builder).build();
|
ClusterState updatedState = newClusterStateBuilder().state(currentState).metaData(builder).build();
|
||||||
|
|
||||||
// counter the number of nodes participating so we can wait for responses from other nodes if needed
|
int counter = 1; // we want to wait on the master node to apply it on its cluster state
|
||||||
int counter = 1; // this mast node
|
// also wait for nodes that actually have the index created on them to apply the mappings internally
|
||||||
for (String index : request.indices) {
|
for (String index : request.indices) {
|
||||||
IndexRoutingTable indexRoutingTable = updatedState.routingTable().index(index);
|
IndexRoutingTable indexRoutingTable = updatedState.routingTable().index(index);
|
||||||
if (indexRoutingTable != null) {
|
if (indexRoutingTable != null) {
|
||||||
|
@ -506,7 +506,7 @@ public class MetaDataMappingService extends AbstractComponent {
|
||||||
@Override
|
@Override
|
||||||
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
|
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
|
||||||
if (countDownListener != null) {
|
if (countDownListener != null) {
|
||||||
// notify we did stuff on our end.
|
// the master has applied it on its cluster state
|
||||||
countDownListener.onNodeMappingCreated(null);
|
countDownListener.onNodeMappingCreated(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,7 +372,7 @@ public class InternalClusterService extends AbstractLifecycleComponent<ClusterSe
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the current cluster state
|
// update the current cluster state
|
||||||
logger.debug("Updating cluster state version {}: {}", newClusterState.version(), newClusterState);
|
logger.debug("Updating cluster state version {}", newClusterState.version());
|
||||||
clusterState = newClusterState;
|
clusterState = newClusterState;
|
||||||
|
|
||||||
for (ClusterStateListener listener : priorityClusterStateListeners) {
|
for (ClusterStateListener listener : priorityClusterStateListeners) {
|
||||||
|
|
Loading…
Reference in New Issue