From 280d59c724c00cd3f6182a3978c668fa869d4f85 Mon Sep 17 00:00:00 2001 From: hezhen Zhang Date: Thu, 27 Feb 2020 19:15:40 +0800 Subject: [PATCH] Append index name for the source of the cluster put-mapping task (#52690) Add index name(s) into the source for the cluster state update done when putting mapping. This ensures that the pending tasks API includes information on source indices. --- .../elasticsearch/cluster/metadata/MetaDataMappingService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java index 4ad0c3863cc..e5ee59adf2e 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java @@ -33,6 +33,7 @@ import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Priority; +import org.elasticsearch.common.Strings; import org.elasticsearch.common.compress.CompressedXContent; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.unit.TimeValue; @@ -371,7 +372,7 @@ public class MetaDataMappingService { } public void putMapping(final PutMappingClusterStateUpdateRequest request, final ActionListener listener) { - clusterService.submitStateUpdateTask("put-mapping", + clusterService.submitStateUpdateTask("put-mapping " + Strings.arrayToCommaDelimitedString(request.indices()), request, ClusterStateTaskConfig.build(Priority.HIGH, request.masterNodeTimeout()), putMappingExecutor,