|
20 | 20 | package org.elasticsearch.cluster.metadata;
|
21 | 21 |
|
22 | 22 | import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
| 23 | + |
23 | 24 | import org.apache.logging.log4j.Level;
|
24 | 25 | import org.apache.logging.log4j.LogManager;
|
25 | 26 | import org.apache.logging.log4j.Logger;
|
|
100 | 101 | import java.util.stream.Collectors;
|
101 | 102 | import java.util.stream.IntStream;
|
102 | 103 |
|
| 104 | +import static java.util.Collections.emptyMap; |
103 | 105 | import static java.util.Collections.singletonMap;
|
104 | 106 | import static java.util.stream.Collectors.toList;
|
105 | 107 | import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_NUMBER_OF_REPLICAS_SETTING;
|
@@ -494,7 +496,7 @@ private ClusterState applyCreateIndexRequestWithV1Templates(final ClusterState c
|
494 | 496 | MetadataIndexTemplateService.resolveAliases(templates), currentState.metadata(), aliasValidator,
|
495 | 497 | // the context is only used for validation so it's fine to pass fake values for the
|
496 | 498 | // shard id and the current timestamp
|
497 |
| - xContentRegistry, indexService.newQueryShardContext(0, null, () -> 0L, null)), |
| 499 | + xContentRegistry, indexService.newQueryShardContext(0, null, () -> 0L, null, emptyMap())), |
498 | 500 | templates.stream().map(IndexTemplateMetadata::getName).collect(toList()), metadataTransformer);
|
499 | 501 | }
|
500 | 502 |
|
@@ -527,7 +529,7 @@ private ClusterState applyCreateIndexRequestWithV2Template(final ClusterState cu
|
527 | 529 | MetadataIndexTemplateService.resolveAliases(currentState.metadata(), templateName), currentState.metadata(), aliasValidator,
|
528 | 530 | // the context is only used for validation so it's fine to pass fake values for the
|
529 | 531 | // shard id and the current timestamp
|
530 |
| - xContentRegistry, indexService.newQueryShardContext(0, null, () -> 0L, null)), |
| 532 | + xContentRegistry, indexService.newQueryShardContext(0, null, () -> 0L, null, emptyMap())), |
531 | 533 | Collections.singletonList(templateName), metadataTransformer);
|
532 | 534 | }
|
533 | 535 |
|
@@ -578,7 +580,7 @@ private ClusterState applyCreateIndexRequestWithExistingMetadata(final ClusterSt
|
578 | 580 | currentState.metadata(), aliasValidator, xContentRegistry,
|
579 | 581 | // the context is only used for validation so it's fine to pass fake values for the
|
580 | 582 | // shard id and the current timestamp
|
581 |
| - indexService.newQueryShardContext(0, null, () -> 0L, null)), |
| 583 | + indexService.newQueryShardContext(0, null, () -> 0L, null, emptyMap())), |
582 | 584 | org.elasticsearch.common.collect.List.of(), metadataTransformer);
|
583 | 585 | }
|
584 | 586 |
|
|
0 commit comments