Skip to content

Commit c852c81

Browse files
authored
Merge branch 'main' into esql_namedqueries
2 parents c0e6258 + b3b83cc commit c852c81

File tree

7 files changed

+314
-56
lines changed

7 files changed

+314
-56
lines changed

docs/changelog/131200.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 131200
2+
summary: Improve lost-increment message in repo analysis
3+
area: Snapshot/Restore
4+
type: enhancement
5+
issues: []

docs/release-notes/breaking-changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ If you are migrating from a version prior to version 9.0, you must first upgrade
1212

1313
% ## Next version [elasticsearch-nextversion-breaking-changes]
1414

15+
```{applies_to}
16+
stack: coming 9.0.4
17+
```
18+
## 9.0.4 [elasticsearch-9.0.4-breaking-changes]
19+
20+
No breaking changes in this version.
21+
1522
## 9.0.3 [elasticsearch-9.0.3-breaking-changes]
1623

1724
No breaking changes in this version.
@@ -21,6 +28,8 @@ No breaking changes in this version.
2128
Snapshot/Restore:
2229
* Make S3 custom query parameter optional [#128043](https://github.com/elastic/elasticsearch/pull/128043)
2330

31+
32+
2433
## 9.0.1 [elasticsearch-9.0.1-breaking-changes]
2534

2635
No breaking changes in this version.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
version: 9.0.4
2+
released: false
3+
generated: 2025-07-14T17:07:39.875346517Z
4+
changelogs:
5+
- pr: 129223
6+
summary: Fix text similarity reranker does not propagate min score correctly
7+
area: Search
8+
type: bug
9+
issues: []
10+
- pr: 129325
11+
summary: Check for model deployment in inference endpoints before stopping
12+
area: Machine Learning
13+
type: bug
14+
issues:
15+
- 128549
16+
- pr: 129370
17+
summary: Avoid dropping aggregate groupings in local plans
18+
area: ES|QL
19+
type: bug
20+
issues:
21+
- 129811
22+
- 128054
23+
- pr: 129600
24+
summary: Make flattened synthetic source concatenate object keys on scalar/object mismatch
25+
area: Mapping
26+
type: bug
27+
issues:
28+
- 122936
29+
- pr: 129725
30+
summary: Throw a 400 when sorting for all types of range fields
31+
area: Search
32+
type: bug
33+
issues: []
34+
- pr: 129904
35+
summary: Reverse disordered-version warning message
36+
area: Infra/Core
37+
type: bug
38+
issues: []
39+
- pr: 130083
40+
summary: Fix timeout bug in DBQ deletion of unused and orphan ML data
41+
area: Machine Learning
42+
type: bug
43+
issues: []
44+
- pr: 130303
45+
summary: Drain responses on completion for `TransportNodesAction`
46+
area: Distributed
47+
type: bug
48+
issues: []
49+
- pr: 130448
50+
summary: Fix wildcard drop after lookup join
51+
area: ES|QL
52+
type: bug
53+
issues:
54+
- 129561
55+
- pr: 130452
56+
summary: "Aggs: Add cancellation checks to `FilterByFilter` aggregator"
57+
area: Aggregations
58+
type: bug
59+
issues: []
60+
- pr: 130521
61+
summary: Trim to size lists created in source fetchers
62+
area: Search
63+
type: bug
64+
issues: []
65+
- pr: 130576
66+
summary: Avoid O(N^2) in VALUES with ordinals grouping
67+
area: ES|QL
68+
type: bug
69+
issues: []
70+
- pr: 130705
71+
summary: Fix `BytesRef2BlockHash`
72+
area: ES|QL
73+
type: bug
74+
issues: []
75+
- pr: 130776
76+
summary: Fix msearch request parsing when index expression is null
77+
area: Search
78+
type: bug
79+
issues:
80+
- 129631
81+
- pr: 130924
82+
summary: Check field data type before casting when applying geo distance sort
83+
area: Search
84+
type: bug
85+
issues:
86+
- 129500
87+
- pr: 131032
88+
summary: "Fix: `GET _synonyms` returns synonyms with empty rules"
89+
area: Relevance
90+
type: bug
91+
issues: []
92+
- pr: 131081
93+
summary: Fix knn search error when dimensions are not set
94+
area: Vector Search
95+
type: bug
96+
issues:
97+
- 129550

docs/release-notes/deprecations.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,20 @@ To give you insight into what deprecated features you’re using, {{es}}:
1616

1717
% ## Next version [elasticsearch-nextversion-deprecations]
1818

19+
```{applies_to}
20+
stack: coming 9.0.4
21+
```
22+
## 9.0.4 [elasticsearch-9.0.4-deprecations]
23+
24+
No deprecations in this version.
25+
1926
## 9.0.3 [elasticsearch-9.0.3-deprecations]
2027

2128
Engine:
2229
* Deprecate `indices.merge.scheduler.use_thread_pool` setting [#129464](https://github.com/elastic/elasticsearch/pull/129464)
2330

31+
32+
2433
## 9.0.2 [elasticsearch-9.0.2-deprecations]
2534

2635
No deprecations in this version.

docs/release-notes/index.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,49 @@ To check for security updates, go to [Security announcements for the Elastic sta
2020
% ### Fixes [elasticsearch-next-fixes]
2121
% *
2222

23+
## 9.0.4 [elasticsearch-9.0.4-release-notes]
24+
```{applies_to}
25+
stack: coming 9.0.4
26+
```
27+
28+
### Fixes [elasticsearch-9.0.4-fixes]
29+
30+
Aggregations:
31+
* Aggs: Add cancellation checks to `FilterByFilter` aggregator [#130452](https://github.com/elastic/elasticsearch/pull/130452)
32+
33+
Distributed:
34+
* Drain responses on completion for `TransportNodesAction` [#130303](https://github.com/elastic/elasticsearch/pull/130303)
35+
36+
ES|QL:
37+
* Avoid O(N^2) in VALUES with ordinals grouping [#130576](https://github.com/elastic/elasticsearch/pull/130576)
38+
* Avoid dropping aggregate groupings in local plans [#129370](https://github.com/elastic/elasticsearch/pull/129370) (issues: [#129811](https://github.com/elastic/elasticsearch/issues/129811), [#128054](https://github.com/elastic/elasticsearch/issues/128054))
39+
* Fix `BytesRef2BlockHash` [#130705](https://github.com/elastic/elasticsearch/pull/130705)
40+
* Fix wildcard drop after lookup join [#130448](https://github.com/elastic/elasticsearch/pull/130448) (issue: [#129561](https://github.com/elastic/elasticsearch/issues/129561))
41+
42+
Infra/Core:
43+
* Reverse disordered-version warning message [#129904](https://github.com/elastic/elasticsearch/pull/129904)
44+
45+
Machine Learning:
46+
* Check for model deployment in inference endpoints before stopping [#129325](https://github.com/elastic/elasticsearch/pull/129325) (issue: [#128549](https://github.com/elastic/elasticsearch/issues/128549))
47+
* Fix timeout bug in DBQ deletion of unused and orphan ML data [#130083](https://github.com/elastic/elasticsearch/pull/130083)
48+
49+
Mapping:
50+
* Make flattened synthetic source concatenate object keys on scalar/object mismatch [#129600](https://github.com/elastic/elasticsearch/pull/129600) (issue: [#122936](https://github.com/elastic/elasticsearch/issues/122936))
51+
52+
Relevance:
53+
* Fix: `GET _synonyms` returns synonyms with empty rules [#131032](https://github.com/elastic/elasticsearch/pull/131032)
54+
55+
Search:
56+
* Check field data type before casting when applying geo distance sort [#130924](https://github.com/elastic/elasticsearch/pull/130924) (issue: [#129500](https://github.com/elastic/elasticsearch/issues/129500))
57+
* Fix msearch request parsing when index expression is null [#130776](https://github.com/elastic/elasticsearch/pull/130776) (issue: [#129631](https://github.com/elastic/elasticsearch/issues/129631))
58+
* Fix text similarity reranker does not propagate min score correctly [#129223](https://github.com/elastic/elasticsearch/pull/129223)
59+
* Throw a 400 when sorting for all types of range fields [#129725](https://github.com/elastic/elasticsearch/pull/129725)
60+
* Trim to size lists created in source fetchers [#130521](https://github.com/elastic/elasticsearch/pull/130521)
61+
62+
Vector Search:
63+
* Fix knn search error when dimensions are not set [#131081](https://github.com/elastic/elasticsearch/pull/131081) (issue: [#129550](https://github.com/elastic/elasticsearch/issues/129550))
64+
65+
2366
## 9.0.3 [elasticsearch-9.0.3-release-notes]
2467

2568
### Features and enhancements [elasticsearch-9.0.3-features-enhancements]
@@ -89,6 +132,7 @@ Searchable Snapshots:
89132
Security:
90133
* Fix error message when changing the password for a user in the file realm [#127621](https://github.com/elastic/elasticsearch/pull/127621)
91134

135+
92136
## 9.0.2 [elasticsearch-9.0.2-release-notes]
93137

94138
### Features and enhancements [elasticsearch-9.0.2-features-enhancements]

x-pack/plugin/snapshot-repo-test-kit/src/internalClusterTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/RepositoryAnalysisFailureIT.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
import static org.hamcrest.Matchers.containsString;
7777
import static org.hamcrest.Matchers.equalTo;
7878
import static org.hamcrest.Matchers.instanceOf;
79+
import static org.hamcrest.Matchers.matchesPattern;
7980
import static org.hamcrest.Matchers.nullValue;
8081

8182
public class RepositoryAnalysisFailureIT extends AbstractSnapshotIntegTestCase {
@@ -385,6 +386,55 @@ public BytesReference onContendedCompareAndExchange(BytesRegister register, Byte
385386
assertAnalysisFailureMessage(analyseRepositoryExpectFailure(request).getMessage());
386387
}
387388

389+
public void testFailsOnLostIncrement() {
390+
final RepositoryAnalyzeAction.Request request = new RepositoryAnalyzeAction.Request("test-repo");
391+
final AtomicBoolean registerWasCorrupted = new AtomicBoolean();
392+
393+
blobStore.setDisruption(new Disruption() {
394+
@Override
395+
public BytesReference onContendedCompareAndExchange(BytesRegister register, BytesReference expected, BytesReference updated) {
396+
if (expected.equals(updated) == false // not the initial read
397+
&& updated.length() == Long.BYTES // not the final write
398+
&& randomBoolean()
399+
&& register.get().equals(expected) // would have succeeded
400+
&& registerWasCorrupted.compareAndSet(false, true)) {
401+
402+
// indicate success without actually applying the update
403+
return expected;
404+
}
405+
406+
return register.compareAndExchange(expected, updated);
407+
}
408+
});
409+
410+
safeAwait((ActionListener<RepositoryAnalyzeAction.Response> l) -> analyseRepository(request, l.delegateResponse((ll, e) -> {
411+
if (ExceptionsHelper.unwrapCause(e) instanceof RepositoryVerificationException repositoryVerificationException) {
412+
assertAnalysisFailureMessage(repositoryVerificationException.getMessage());
413+
assertTrue(
414+
"did not lose increment, so why did the verification fail?",
415+
// clear flag for final assertion
416+
registerWasCorrupted.compareAndSet(true, false)
417+
);
418+
assertThat(
419+
asInstanceOf(
420+
RepositoryVerificationException.class,
421+
ExceptionsHelper.unwrapCause(repositoryVerificationException.getCause())
422+
).getMessage(),
423+
matchesPattern("""
424+
\\[test-repo] Successfully completed all \\[.*] atomic increments of register \\[test-register-contended-.*] \
425+
so its expected value is \\[OptionalBytesReference\\[.*]], but reading its value with \\[.*] unexpectedly \
426+
yielded \\[OptionalBytesReference\\[.*]]\\. This anomaly may indicate an atomicity failure amongst concurrent \
427+
compare-and-exchange operations on registers in this repository\\.""")
428+
);
429+
ll.onResponse(null);
430+
} else {
431+
ll.onFailure(e);
432+
}
433+
})));
434+
435+
assertFalse(registerWasCorrupted.get());
436+
}
437+
388438
public void testFailsIfRegisterHoldsSpuriousValue() {
389439
final RepositoryAnalyzeAction.Request request = new RepositoryAnalyzeAction.Request("test-repo");
390440

0 commit comments

Comments
 (0)