Skip to content

Commit 50f78a2

Browse files
Merge branch 'main' into esql-ccs-simplified-grammar
2 parents 64e3af1 + a0cc698 commit 50f78a2

File tree

37 files changed

+290
-232
lines changed

37 files changed

+290
-232
lines changed

.buildkite/pipelines/intake.template.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ steps:
7272
buildDirectory: /dev/shm/bk
7373
env:
7474
BWC_VERSION: "{{matrix.BWC_VERSION}}"
75-
- label: bc-upgrade
76-
command: ".buildkite/scripts/run-bc-upgrade-tests.sh"
7775
- group: lucene-compat
7876
steps:
7977
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"

.buildkite/pipelines/intake.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ steps:
7272
buildDirectory: /dev/shm/bk
7373
env:
7474
BWC_VERSION: "{{matrix.BWC_VERSION}}"
75-
- label: bc-upgrade
76-
command: ".buildkite/scripts/run-bc-upgrade-tests.sh"
77-
agents:
78-
image: "docker.elastic.co/ci-agent-images/eck-region/buildkite-agent:1.5"
79-
memory: "4G"
8075
- group: lucene-compat
8176
steps:
8277
- label: "{{matrix.LUCENE_VERSION}} / lucene-compat"

.buildkite/scripts/run-bc-upgrade-tests.sh

Lines changed: 0 additions & 69 deletions
This file was deleted.

docs/changelog/129074.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129074
2+
summary: "[apm-data] Set `event.dataset` if empty for logs"
3+
area: Data streams
4+
type: bug
5+
issues: []

modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.elasticsearch.common.lucene.Lucene;
3434
import org.elasticsearch.common.unit.Fuzziness;
3535
import org.elasticsearch.index.IndexVersion;
36-
import org.elasticsearch.index.IndexVersions;
3736
import org.elasticsearch.index.analysis.IndexAnalyzers;
3837
import org.elasticsearch.index.analysis.NamedAnalyzer;
3938
import org.elasticsearch.index.fielddata.FieldDataContext;
@@ -71,6 +70,8 @@
7170
import java.util.Objects;
7271
import java.util.Set;
7372

73+
import static org.elasticsearch.index.mapper.TextFieldMapper.Builder.multiFieldsNotStoredByDefaultIndexVersionCheck;
74+
7475
/**
7576
* A {@link FieldMapper} for full-text fields that only indexes
7677
* {@link IndexOptions#DOCS} and runs positional queries by looking at the
@@ -140,7 +141,7 @@ private MatchOnlyTextFieldType buildFieldType(MapperBuilderContext context) {
140141
public MatchOnlyTextFieldMapper build(MapperBuilderContext context) {
141142
MatchOnlyTextFieldType tft = buildFieldType(context);
142143
final boolean storeSource;
143-
if (indexCreatedVersion.onOrAfter(IndexVersions.MAPPER_TEXT_MATCH_ONLY_MULTI_FIELDS_DEFAULT_NOT_STORED)) {
144+
if (multiFieldsNotStoredByDefaultIndexVersionCheck(indexCreatedVersion)) {
144145
storeSource = context.isSourceSynthetic()
145146
&& withinMultiField == false
146147
&& multiFieldsBuilder.hasSyntheticSourceCompatibleKeywordField() == false;

muted-tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,18 @@ tests:
574574
- class: org.elasticsearch.xpack.logsdb.qa.StoredSourceLogsDbVersusReindexedLogsDbChallengeRestIT
575575
method: testMatchAllQuery
576576
issue: https://github.com/elastic/elasticsearch/issues/129529
577+
- class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceTests
578+
method: testIORateIsAdjustedForAllRunningMergeTasks
579+
issue: https://github.com/elastic/elasticsearch/issues/129531
580+
- class: org.elasticsearch.upgrades.IndexingIT
581+
method: testIndexing
582+
issue: https://github.com/elastic/elasticsearch/issues/129533
583+
- class: org.elasticsearch.upgrades.MlJobSnapshotUpgradeIT
584+
method: testSnapshotUpgrader
585+
issue: https://github.com/elastic/elasticsearch/issues/98560
586+
- class: org.elasticsearch.upgrades.QueryableBuiltInRolesUpgradeIT
587+
method: testBuiltInRolesSyncedOnClusterUpgrade
588+
issue: https://github.com/elastic/elasticsearch/issues/129534
577589

578590
# Examples:
579591
#

server/src/internalClusterTest/java/org/elasticsearch/index/shard/IndexShardIT.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
import org.elasticsearch.cluster.ClusterInfoService;
2020
import org.elasticsearch.cluster.ClusterInfoServiceUtils;
2121
import org.elasticsearch.cluster.ClusterState;
22+
import org.elasticsearch.cluster.EstimatedHeapUsage;
23+
import org.elasticsearch.cluster.EstimatedHeapUsageCollector;
2224
import org.elasticsearch.cluster.InternalClusterInfoService;
23-
import org.elasticsearch.cluster.ShardHeapUsage;
24-
import org.elasticsearch.cluster.ShardHeapUsageCollector;
2525
import org.elasticsearch.cluster.metadata.IndexMetadata;
2626
import org.elasticsearch.cluster.node.DiscoveryNode;
2727
import org.elasticsearch.cluster.node.DiscoveryNodeUtils;
@@ -123,7 +123,7 @@ public class IndexShardIT extends ESSingleNodeTestCase {
123123

124124
@Override
125125
protected Collection<Class<? extends Plugin>> getPlugins() {
126-
return pluginList(InternalSettingsPlugin.class, BogusShardHeapUsagePlugin.class);
126+
return pluginList(InternalSettingsPlugin.class, BogusEstimatedHeapUsagePlugin.class);
127127
}
128128

129129
public void testLockTryingToDelete() throws Exception {
@@ -264,31 +264,31 @@ public void testExpectedShardSizeIsPresent() throws InterruptedException {
264264
public void testHeapUsageEstimateIsPresent() {
265265
InternalClusterInfoService clusterInfoService = (InternalClusterInfoService) getInstanceFromNode(ClusterInfoService.class);
266266
ClusterInfoServiceUtils.refresh(clusterInfoService);
267-
Map<String, ShardHeapUsage> shardHeapUsages = clusterInfoService.getClusterInfo().getShardHeapUsages();
268-
assertNotNull(shardHeapUsages);
267+
Map<String, EstimatedHeapUsage> estimatedHeapUsages = clusterInfoService.getClusterInfo().getEstimatedHeapUsages();
268+
assertNotNull(estimatedHeapUsages);
269269
// Not collecting yet because it is disabled
270-
assertTrue(shardHeapUsages.isEmpty());
270+
assertTrue(estimatedHeapUsages.isEmpty());
271271

272-
// Enable collection for shard heap usages
272+
// Enable collection for estimated heap usages
273273
updateClusterSettings(
274274
Settings.builder()
275-
.put(InternalClusterInfoService.CLUSTER_ROUTING_ALLOCATION_SHARD_HEAP_THRESHOLD_DECIDER_ENABLED.getKey(), true)
275+
.put(InternalClusterInfoService.CLUSTER_ROUTING_ALLOCATION_ESTIMATED_HEAP_THRESHOLD_DECIDER_ENABLED.getKey(), true)
276276
.build()
277277
);
278278
try {
279279
ClusterInfoServiceUtils.refresh(clusterInfoService);
280280
ClusterState state = getInstanceFromNode(ClusterService.class).state();
281-
shardHeapUsages = clusterInfoService.getClusterInfo().getShardHeapUsages();
282-
assertEquals(state.nodes().size(), shardHeapUsages.size());
281+
estimatedHeapUsages = clusterInfoService.getClusterInfo().getEstimatedHeapUsages();
282+
assertEquals(state.nodes().size(), estimatedHeapUsages.size());
283283
for (DiscoveryNode node : state.nodes()) {
284-
assertTrue(shardHeapUsages.containsKey(node.getId()));
285-
ShardHeapUsage shardHeapUsage = shardHeapUsages.get(node.getId());
286-
assertThat(shardHeapUsage.estimatedFreeBytes(), lessThanOrEqualTo(shardHeapUsage.totalBytes()));
284+
assertTrue(estimatedHeapUsages.containsKey(node.getId()));
285+
EstimatedHeapUsage estimatedHeapUsage = estimatedHeapUsages.get(node.getId());
286+
assertThat(estimatedHeapUsage.estimatedFreeBytes(), lessThanOrEqualTo(estimatedHeapUsage.totalBytes()));
287287
}
288288
} finally {
289289
updateClusterSettings(
290290
Settings.builder()
291-
.putNull(InternalClusterInfoService.CLUSTER_ROUTING_ALLOCATION_SHARD_HEAP_THRESHOLD_DECIDER_ENABLED.getKey())
291+
.putNull(InternalClusterInfoService.CLUSTER_ROUTING_ALLOCATION_ESTIMATED_HEAP_THRESHOLD_DECIDER_ENABLED.getKey())
292292
.build()
293293
);
294294
}
@@ -838,11 +838,11 @@ private static void assertAllIndicesRemovedAndDeletionCompleted(Iterable<Indices
838838
}
839839
}
840840

841-
public static class BogusShardShardHeapUsageCollector implements ShardHeapUsageCollector {
841+
public static class BogusEstimatedEstimatedHeapUsageCollector implements EstimatedHeapUsageCollector {
842842

843-
private final BogusShardHeapUsagePlugin plugin;
843+
private final BogusEstimatedHeapUsagePlugin plugin;
844844

845-
public BogusShardShardHeapUsageCollector(BogusShardHeapUsagePlugin plugin) {
845+
public BogusEstimatedEstimatedHeapUsageCollector(BogusEstimatedHeapUsagePlugin plugin) {
846846
this.plugin = plugin;
847847
}
848848

@@ -859,7 +859,7 @@ public void collectClusterHeapUsage(ActionListener<Map<String, Long>> listener)
859859
}
860860
}
861861

862-
public static class BogusShardHeapUsagePlugin extends Plugin implements ClusterPlugin {
862+
public static class BogusEstimatedHeapUsagePlugin extends Plugin implements ClusterPlugin {
863863

864864
private final SetOnce<ClusterService> clusterService = new SetOnce<>();
865865

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# License v3.0 only", or the "Server Side Public License, v 1".
88
#
99

10-
org.elasticsearch.index.shard.IndexShardIT$BogusShardShardHeapUsageCollector
10+
org.elasticsearch.index.shard.IndexShardIT$BogusEstimatedEstimatedHeapUsageCollector

server/src/main/java/org/elasticsearch/cluster/ClusterInfo.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class ClusterInfo implements ChunkedToXContent, Writeable {
5757
final Map<ShardId, Long> shardDataSetSizes;
5858
final Map<NodeAndShard, String> dataPath;
5959
final Map<NodeAndPath, ReservedSpace> reservedSpace;
60-
final Map<String, ShardHeapUsage> shardHeapUsages;
60+
final Map<String, EstimatedHeapUsage> estimatedHeapUsages;
6161

6262
protected ClusterInfo() {
6363
this(Map.of(), Map.of(), Map.of(), Map.of(), Map.of(), Map.of(), Map.of());
@@ -72,7 +72,7 @@ protected ClusterInfo() {
7272
* @param shardDataSetSizes a shard id to data set size in bytes mapping per shard
7373
* @param dataPath the shard routing to datapath mapping
7474
* @param reservedSpace reserved space per shard broken down by node and data path
75-
* @param shardHeapUsages shard heap usage broken down by node
75+
* @param estimatedHeapUsages estimated heap usage broken down by node
7676
* @see #shardIdentifierFromRouting
7777
*/
7878
public ClusterInfo(
@@ -82,15 +82,15 @@ public ClusterInfo(
8282
Map<ShardId, Long> shardDataSetSizes,
8383
Map<NodeAndShard, String> dataPath,
8484
Map<NodeAndPath, ReservedSpace> reservedSpace,
85-
Map<String, ShardHeapUsage> shardHeapUsages
85+
Map<String, EstimatedHeapUsage> estimatedHeapUsages
8686
) {
8787
this.leastAvailableSpaceUsage = Map.copyOf(leastAvailableSpaceUsage);
8888
this.mostAvailableSpaceUsage = Map.copyOf(mostAvailableSpaceUsage);
8989
this.shardSizes = Map.copyOf(shardSizes);
9090
this.shardDataSetSizes = Map.copyOf(shardDataSetSizes);
9191
this.dataPath = Map.copyOf(dataPath);
9292
this.reservedSpace = Map.copyOf(reservedSpace);
93-
this.shardHeapUsages = Map.copyOf(shardHeapUsages);
93+
this.estimatedHeapUsages = Map.copyOf(estimatedHeapUsages);
9494
}
9595

9696
public ClusterInfo(StreamInput in) throws IOException {
@@ -103,9 +103,9 @@ public ClusterInfo(StreamInput in) throws IOException {
103103
: in.readImmutableMap(nested -> NodeAndShard.from(new ShardRouting(nested)), StreamInput::readString);
104104
this.reservedSpace = in.readImmutableMap(NodeAndPath::new, ReservedSpace::new);
105105
if (in.getTransportVersion().onOrAfter(TransportVersions.HEAP_USAGE_IN_CLUSTER_INFO)) {
106-
this.shardHeapUsages = in.readImmutableMap(ShardHeapUsage::new);
106+
this.estimatedHeapUsages = in.readImmutableMap(EstimatedHeapUsage::new);
107107
} else {
108-
this.shardHeapUsages = Map.of();
108+
this.estimatedHeapUsages = Map.of();
109109
}
110110
}
111111

@@ -122,7 +122,7 @@ public void writeTo(StreamOutput out) throws IOException {
122122
}
123123
out.writeMap(this.reservedSpace);
124124
if (out.getTransportVersion().onOrAfter(TransportVersions.HEAP_USAGE_IN_CLUSTER_INFO)) {
125-
out.writeMap(this.shardHeapUsages, StreamOutput::writeWriteable);
125+
out.writeMap(this.estimatedHeapUsages, StreamOutput::writeWriteable);
126126
}
127127
}
128128

@@ -204,7 +204,7 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params
204204
return builder.endObject(); // NodeAndPath
205205
}),
206206
endArray() // end "reserved_sizes"
207-
// NOTE: We don't serialize shardHeapUsages at this stage, to avoid
207+
// NOTE: We don't serialize estimatedHeapUsages at this stage, to avoid
208208
// committing to API payloads until the feature is settled
209209
);
210210
}
@@ -216,8 +216,8 @@ public Iterator<? extends ToXContent> toXContentChunked(ToXContent.Params params
216216
* Also note that the map may not be complete, it may contain none, or a subset of the nodes in
217217
* the cluster at any time. It may also contain entries for nodes that have since left the cluster.
218218
*/
219-
public Map<String, ShardHeapUsage> getShardHeapUsages() {
220-
return shardHeapUsages;
219+
public Map<String, EstimatedHeapUsage> getEstimatedHeapUsages() {
220+
return estimatedHeapUsages;
221221
}
222222

223223
/**

server/src/main/java/org/elasticsearch/cluster/ClusterInfoSimulator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class ClusterInfoSimulator {
3333
private final CopyOnFirstWriteMap<String, Long> shardSizes;
3434
private final Map<ShardId, Long> shardDataSetSizes;
3535
private final Map<NodeAndShard, String> dataPath;
36-
private final Map<String, ShardHeapUsage> shardHeapUsages;
36+
private final Map<String, EstimatedHeapUsage> estimatedHeapUsages;
3737

3838
public ClusterInfoSimulator(RoutingAllocation allocation) {
3939
this.allocation = allocation;
@@ -42,7 +42,7 @@ public ClusterInfoSimulator(RoutingAllocation allocation) {
4242
this.shardSizes = new CopyOnFirstWriteMap<>(allocation.clusterInfo().shardSizes);
4343
this.shardDataSetSizes = Map.copyOf(allocation.clusterInfo().shardDataSetSizes);
4444
this.dataPath = Map.copyOf(allocation.clusterInfo().dataPath);
45-
this.shardHeapUsages = allocation.clusterInfo().getShardHeapUsages();
45+
this.estimatedHeapUsages = allocation.clusterInfo().getEstimatedHeapUsages();
4646
}
4747

4848
/**
@@ -156,7 +156,7 @@ public ClusterInfo getClusterInfo() {
156156
shardDataSetSizes,
157157
dataPath,
158158
Map.of(),
159-
shardHeapUsages
159+
estimatedHeapUsages
160160
);
161161
}
162162
}

0 commit comments

Comments
 (0)