Skip to content

Commit 280d59c

Browse files
zhanghezhenhenningandersen
authored andcommitted
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.
1 parent 52fa465 commit 280d59c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataMappingService.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.elasticsearch.cluster.service.ClusterService;
3434
import org.elasticsearch.common.Nullable;
3535
import org.elasticsearch.common.Priority;
36+
import org.elasticsearch.common.Strings;
3637
import org.elasticsearch.common.compress.CompressedXContent;
3738
import org.elasticsearch.common.inject.Inject;
3839
import org.elasticsearch.common.unit.TimeValue;
@@ -371,7 +372,7 @@ public String describeTasks(List<PutMappingClusterStateUpdateRequest> tasks) {
371372
}
372373

373374
public void putMapping(final PutMappingClusterStateUpdateRequest request, final ActionListener<ClusterStateUpdateResponse> listener) {
374-
clusterService.submitStateUpdateTask("put-mapping",
375+
clusterService.submitStateUpdateTask("put-mapping " + Strings.arrayToCommaDelimitedString(request.indices()),
375376
request,
376377
ClusterStateTaskConfig.build(Priority.HIGH, request.masterNodeTimeout()),
377378
putMappingExecutor,

0 commit comments

Comments
 (0)