Skip to content

Commit 124fdac

Browse files
committed
Merge branch 'main' into fix-dlm-ilm-mixing-tests
2 parents 0e560b4 + 0405fb0 commit 124fdac

File tree

89 files changed

+2001
-597
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2001
-597
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/RestrictedBuildApiService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
6161
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-ingest-with-all-dependencies");
6262
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-plugins");
6363
map.put(LegacyRestTestBasePlugin.class, ":qa:system-indices");
64-
map.put(LegacyRestTestBasePlugin.class, ":qa:verify-version-constants");
6564
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-apm-integration");
6665
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-delayed-aggs");
6766
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-die-with-dignity");

build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,16 @@ allprojects {
295295
tasks.register('resolveAllDependencies', ResolveAllDependencies) {
296296
def ignoredPrefixes = [DistributionDownloadPlugin.ES_DISTRO_CONFIG_PREFIX, "jdbcDriver"]
297297
configs = project.configurations.matching { config -> ignoredPrefixes.any { config.name.startsWith(it) } == false }
298-
resolveJavaToolChain = true
298+
if(project.path == ':') {
299+
resolveJavaToolChain = true
300+
301+
// ensure we have best possible caching of bwc builds
302+
dependsOn ":distribution:bwc:bugfix:buildBwcLinuxTar"
303+
dependsOn ":distribution:bwc:bugfix2:buildBwcLinuxTar"
304+
dependsOn ":distribution:bwc:minor:buildBwcLinuxTar"
305+
dependsOn ":distribution:bwc:staged:buildBwcLinuxTar"
306+
dependsOn ":distribution:bwc:staged2:buildBwcLinuxTar"
307+
}
299308
if (project.path.contains("fixture")) {
300309
dependsOn tasks.withType(ComposePull)
301310
}
@@ -306,6 +315,7 @@ allprojects {
306315
// ensure we resolve p2 dependencies for the spotless eclipse formatter
307316
dependsOn "spotlessJavaCheck"
308317
}
318+
309319
}
310320

311321
ext.withReleaseBuild = { Closure config ->

docs/build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.elasticsearch.gradle.Version
2+
import org.elasticsearch.gradle.VersionProperties
23
import org.elasticsearch.gradle.internal.doc.DocSnippetTask
34
import static org.elasticsearch.gradle.testclusters.TestDistribution.DEFAULT
45

@@ -2059,3 +2060,29 @@ setups['setup-snapshots'] = setups['setup-repository'] + '''
20592060
setups['atomic_red_regsvr32'].replace('#atomic_red_data#', events)
20602061
}
20612062
}
2063+
2064+
tasks.register('verifyDocsLuceneVersion') {
2065+
doFirst {
2066+
File docsVersionsFile = file('Versions.asciidoc')
2067+
List<String> versionLines = docsVersionsFile.readLines('UTF-8')
2068+
String docsLuceneVersion = null
2069+
for (String line : versionLines) {
2070+
if (line.startsWith(':lucene_version:')) {
2071+
docsLuceneVersion = line.split()[1]
2072+
}
2073+
}
2074+
if (docsLuceneVersion == null) {
2075+
throw new GradleException('Could not find lucene version in docs version file')
2076+
}
2077+
String expectedLuceneVersion = VersionProperties.lucene
2078+
// remove potential -snapshot-{gitrev} suffix
2079+
expectedLuceneVersion -= ~/-snapshot-[0-9a-f]+$/
2080+
if (docsLuceneVersion != expectedLuceneVersion) {
2081+
throw new GradleException("Lucene version in docs [${docsLuceneVersion}] does not match version.properties [${expectedLuceneVersion}]")
2082+
}
2083+
}
2084+
}
2085+
2086+
tasks.named('check') {
2087+
dependsOn 'verifyDocsLuceneVersion'
2088+
}

docs/changelog/124062.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124062
2+
summary: Upgrade to repository-gcs to use com.google.cloud:google-cloud-storage-bom:2.50.0
3+
area: Snapshot/Restore
4+
type: upgrade
5+
issues: []

docs/changelog/124913.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 124913
2+
summary: Report `original_types`
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

docs/changelog/125595.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125595
2+
summary: Esql - Fix lucene push down behavior when a range contains nanos and millis
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/125606.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pr: 125606
2+
summary: Rename deprecation index template
3+
area: Infra/Logging
4+
type: breaking
5+
issues:
6+
- 125445
7+
breaking:
8+
title: Rename deprecation index template
9+
area: Logging
10+
details: The deprecation datastream contains log entries for deprecations that
11+
occured while Elasticsearch is running. The deprecation log entries had a
12+
mismatch in their dataset name. In order to avoid changing the dataset
13+
name in the existing datastream, a new datastream now exists.
14+
impact: If querying for deprecations previously using the
15+
`.logs-deprecation.elasticsearch-default` datastream, you should now use the
16+
`.logs-elasticsearch.deprecation-default` datastream.
17+
notable: false

docs/internal/DistributedArchitectureGuide.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ to communicate with Elasticsearch.
110110

111111
### Cluster State
112112

113+
[ClusterState]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/cluster/ClusterState.java
114+
[Metadata]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java
115+
[ProjectMetadata]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/cluster/metadata/ProjectMetadata.java
116+
117+
The [Metadata] of a [ClusterState] is persisted on disk and comprises information from two categories:
118+
1. Cluster scope information such as `clusterUUID`, `CoordinationMetadata`
119+
2. Project scope information ([ProjectMetadata]) such as indices and templates belong to each project.
120+
121+
Some concepts are applicable to both cluster and project scopes, e.g. [persistent tasks](#persistent-tasks). The state of a persistent task is therefore stored accordingly depending on the task's scope.
122+
113123
#### Master Service
114124

115125
#### Cluster State Publication
@@ -306,7 +316,7 @@ policies.
306316

307317
### How cluster capacity is determined
308318

309-
[AutoscalingMetadata][] implements [Metadata.Custom][] in order to persist autoscaling policies. Each
319+
[AutoscalingMetadata][] implements [Metadata.ClusterCustom][] in order to persist autoscaling policies. Each
310320
Decider is an implementation of [AutoscalingDeciderService][]. The [AutoscalingCalculateCapacityService][]
311321
is responsible for running the calculation.
312322

@@ -322,7 +332,7 @@ calls [through the CapacityResponseCache][], into the `AutoscalingCalculateCapac
322332
concurrent callers.
323333

324334
[AutoscalingMetadata]: https://github.com/elastic/elasticsearch/blob/v8.13.2/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/AutoscalingMetadata.java#L38
325-
[Metadata.Custom]: https://github.com/elastic/elasticsearch/blob/v8.13.2/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java#L141-L145
335+
[Metadata.ClusterCustom]: https://github.com/elastic/elasticsearch/blob/f461731a30a6fe55d7d7b343d38426ddca1ac873/server/src/main/java/org/elasticsearch/cluster/metadata/Metadata.java#L147
326336
[AutoscalingDeciderService]: https://github.com/elastic/elasticsearch/blob/v8.13.2/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/capacity/AutoscalingDeciderService.java#L16-L19
327337
[AutoscalingCalculateCapacityService]: https://github.com/elastic/elasticsearch/blob/v8.13.2/x-pack/plugin/autoscaling/src/main/java/org/elasticsearch/xpack/autoscaling/capacity/AutoscalingCalculateCapacityService.java#L43
328338

@@ -505,6 +515,8 @@ The [Task management API] also exposes an endpoint where a task ID can be specif
505515

506516
[PersistentTaskPlugin]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/plugins/PersistentTaskPlugin.java
507517
[PersistentTasksExecutor]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java
518+
[PersistentTasksExecutor.Scope.Cluster]:https://github.com/elastic/elasticsearch/blob/f461731a30a6fe55d7d7b343d38426ddca1ac873/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java#L52
519+
[PersistentTasksExecutor.Scope.Project]:https://github.com/elastic/elasticsearch/blob/f461731a30a6fe55d7d7b343d38426ddca1ac873/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java#L48
508520
[PersistentTasksExecutorRegistry]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutorRegistry.java
509521
[PersistentTasksNodeService]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/PersistentTasksNodeService.java
510522
[PersistentTasksClusterService]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/PersistentTasksClusterService.java
@@ -513,13 +525,14 @@ The [Task management API] also exposes an endpoint where a task ID can be specif
513525
[HealthNodeTaskExecutor]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/health/node/selection/HealthNodeTaskExecutor.java
514526
[SystemIndexMigrationExecutor]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/upgrades/SystemIndexMigrationExecutor.java
515527
[PersistentTasksCustomMetadata]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetadata.java
528+
[ClusterPersistentTasksCustomMetadata]:https://github.com/elastic/elasticsearch/blob/main/server/src/main/java/org/elasticsearch/persistent/ClusterPersistentTasksCustomMetadata.java
516529
[PersistentTasksCustomMetadata.PersistentTask]:https://github.com/elastic/elasticsearch/blob/d466ad1c3c4cedc7d5f6ab5794abe7bfd72aef4e/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetadata.java#L305
517530

518531
Up until now we have discussed only ephemeral tasks. If we want a task to survive node failures, it needs to be registered as a persistent task at the cluster level.
519532

520-
Plugins can register persistent tasks definitions by implementing [PersistentTaskPlugin] and returning one or more [PersistentTasksExecutor] instances. These are collated into a [PersistentTasksExecutorRegistry] which is provided to [PersistentTasksNodeService] active on each node in the cluster, and a [PersistentTasksClusterService] active on the master.
533+
Plugins can register persistent tasks definitions by implementing [PersistentTaskPlugin] and returning one or more [PersistentTasksExecutor] instances. These are collated into a [PersistentTasksExecutorRegistry] which is provided to [PersistentTasksNodeService] active on each node in the cluster, and a [PersistentTasksClusterService] active on the master. A [PersistentTasksExecutor] can declare either [project][PersistentTasksExecutor.Scope.Project] or [cluster][PersistentTasksExecutor.Scope.Cluster] scope, but not both. A project scope task is not able to access data on a different project.
521534

522-
The [PersistentTasksClusterService] runs on the master to manage the set of running persistent tasks. It periodically checks that all persistent tasks are assigned to live nodes and handles the creation, completion, removal and updates-to-the-state of persistent task instances in the cluster state (see [PersistentTasksCustomMetadata]).
535+
The [PersistentTasksClusterService] runs on the master to manage the set of running persistent tasks. It periodically checks that all persistent tasks are assigned to live nodes and handles the creation, completion, removal and updates-to-the-state of persistent task instances in the cluster state (see [PersistentTasksCustomMetadata] and [ClusterPersistentTasksCustomMetadata]).
523536

524537
The [PersistentTasksNodeService] monitors the cluster state to:
525538
- Start any tasks allocated to it (tracked in the local [TaskManager] by an [AllocatedPersistentTask])
@@ -529,7 +542,7 @@ If a node leaves the cluster while it has a persistent task allocated to it, the
529542

530543
Some examples of the use of persistent tasks include:
531544
- [ShardFollowTasksExecutor]: Defined by [cross-cluster replication](#cross-cluster-replication-ccr) to poll a remote cluster for updates
532-
- [HealthNodeTaskExecutor]: Used to schedule work related to monitoring cluster health
545+
- [HealthNodeTaskExecutor]: Used to schedule work related to monitoring cluster health. This is currently the only example of a cluster scope persistent task.
533546
- [SystemIndexMigrationExecutor]: Manages the migration of system indices after an upgrade
534547

535548
### Integration with APM

docs/reference/query-languages/query-dsl/query-dsl-knn-query.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ POST my-image-index/_search
206206

207207
A sample query can look like below:
208208

209-
```js
209+
```json
210210
{
211211
"query" : {
212212
"nested" : {
@@ -226,6 +226,7 @@ A sample query can look like below:
226226
}
227227
```
228228

229+
Note that nested `knn` only supports `score_mode=max`.
229230

230231
## Knn query with aggregations [knn-query-aggregations]
231232

docs/reference/query-languages/query-dsl/query-dsl-nested-query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ See [Multi-level nested queries](#multi-level-nested-query-ex) for an example.
7171

7272

7373
`score_mode`
74-
: (Optional, string) Indicates how scores for matching child objects affect the root parent document’s [relevance score](/reference/query-languages/query-dsl/query-filter-context.md#relevance-scores). Valid values are:
74+
: (Optional, string) Indicates how scores for matching child objects affect the root parent document’s [relevance score](/reference/query-languages/query-dsl/query-filter-context.md#relevance-scores). Default is `avg`, but nested `knn` queries only support `score_mode=max`. Valid values are:
7575

7676
`avg` (Default)
7777
: Use the mean relevance score of all matching child objects.

0 commit comments

Comments
 (0)