Skip to content

Commit 8dd788a

Browse files
committed
Merge branch 'master' into 2021-06-01-write-next-state-fully-on-failure
2 parents fe649a8 + 78905ba commit 8dd788a

File tree

42 files changed

+986
-582
lines changed

Some content is hidden

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

42 files changed

+986
-582
lines changed

TESTING.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ For example to run a specific tests from the x-pack rolling upgrade from 7.7.0:
518518

519519
Tests are ran for versions that are not yet released but with which the current version will be compatible with.
520520
These are automatically checked out and built from source.
521-
See link:./buildSrc/src/main/java/org/elasticsearch/gradle/BwcVersions.java[BwcVersions]
521+
See link:./build-tools-internal/src/main/java/org/elasticsearch/gradle/BwcVersions.java[BwcVersions]
522522
and link:./distribution/bwc/build.gradle[distribution/bwc/build.gradle]
523523
for more information.
524524

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ tasks.register("verifyVersions") {
170170
* after the backport of the backcompat code is complete.
171171
*/
172172

173-
boolean bwc_tests_enabled = true
173+
boolean bwc_tests_enabled = false
174174
// place a PR link here when committing bwc changes:
175-
String bwc_tests_disabled_issue = ""
175+
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/73624"
176176
/*
177177
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
178178
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/MlClientDocumentationIT.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,13 @@ public void testUpdateJob() throws Exception {
588588
.setDescription("My description") // <2>
589589
.setAnalysisLimits(new AnalysisLimits(1000L, null)) // <3>
590590
.setBackgroundPersistInterval(TimeValue.timeValueHours(3)) // <4>
591-
.setCategorizationFilters(Arrays.asList("categorization-filter")) // <5>
592-
.setDetectorUpdates(Arrays.asList(detectorUpdate)) // <6>
593-
.setGroups(Arrays.asList("job-group-1")) // <7>
594-
.setResultsRetentionDays(10L) // <8>
595-
.setModelPlotConfig(new ModelPlotConfig(true, null, true)) // <9>
596-
.setModelSnapshotRetentionDays(7L) // <10>
597-
.setCustomSettings(customSettings) // <11>
598-
.setRenormalizationWindowDays(3L) // <12>
591+
.setDetectorUpdates(Arrays.asList(detectorUpdate)) // <5>
592+
.setGroups(Arrays.asList("job-group-1")) // <6>
593+
.setResultsRetentionDays(10L) // <7>
594+
.setModelPlotConfig(new ModelPlotConfig(true, null, true)) // <8>
595+
.setModelSnapshotRetentionDays(7L) // <9>
596+
.setCustomSettings(customSettings) // <10>
597+
.setRenormalizationWindowDays(3L) // <11>
599598
.build();
600599
// end::update-job-options
601600

client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsIntegTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.junit.AfterClass;
2828
import org.junit.Before;
2929
import org.junit.BeforeClass;
30+
import org.junit.Ignore;
3031

3132
import java.io.IOException;
3233
import java.net.ConnectException;
@@ -235,6 +236,7 @@ public void onFailure(Exception exception) {
235236
}
236237
}
237238

239+
@Ignore("https://github.com/elastic/elasticsearch/issues/45577")
238240
public void testCancelAsyncRequests() throws Exception {
239241
int numRequests = randomIntBetween(5, 20);
240242
final List<Response> responses = new CopyOnWriteArrayList<>();

docs/java-rest/high-level/ml/update-job.asciidoc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ include-tagged::{doc-tests-file}[{api}-options]
3535
<2> Updated description.
3636
<3> Updated analysis limits.
3737
<4> Updated background persistence interval.
38-
<5> Updated analysis config's categorization filters.
39-
<6> Updated detectors through the `JobUpdate.DetectorUpdate` object.
40-
<7> Updated group membership.
41-
<8> Updated result retention.
42-
<9> Updated model plot configuration.
43-
<10> Updated model snapshot retention setting.
44-
<11> Updated custom settings.
45-
<12> Updated renormalization window.
38+
<5> Updated detectors through the `JobUpdate.DetectorUpdate` object.
39+
<6> Updated group membership.
40+
<7> Updated result retention.
41+
<8> Updated model plot configuration.
42+
<9> Updated model snapshot retention setting.
43+
<10> Updated custom settings.
44+
<11> Updated renormalization window.
4645

4746
Included with these options are specific optional `JobUpdate.DetectorUpdate` updates.
4847
["source","java",subs="attributes,callouts,macros"]

docs/plugins/authors.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[plugin-authors]]
22
== Help for plugin authors
33

4-
:plugin-properties-files: {elasticsearch-root}/buildSrc/src/main/resources
4+
:plugin-properties-files: {elasticsearch-root}/build-tools/src/main/resources
55

66
The Elasticsearch repository contains examples of:
77

docs/reference/alias.asciidoc

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ POST _aliases
4545
----
4646
// TEST[s/^/PUT _data_stream\/logs-nginx.access-prod\n/]
4747

48-
The API's `index` and `indices` parameters support wildcards (`*`). If a
49-
wildcard pattern matches both data streams and indices, the action only uses
50-
matching data streams.
48+
The API's `index` and `indices` parameters support wildcards (`*`). Wildcard
49+
patterns that match both data streams and indices return an error.
5150

5251
[source,console]
5352
----
@@ -210,8 +209,8 @@ GET _alias/logs
210209
=== Write index
211210

212211
If an alias points to multiple indices, you can use `is_write_index` to specify
213-
a write index or data stream. {es} routes any write requests for the alias to this
214-
index or data stream.
212+
a write index or data stream. {es} routes any write requests for the alias to
213+
this index or data stream.
215214

216215
[source,console]
217216
----
@@ -220,31 +219,33 @@ POST _aliases
220219
"actions": [
221220
{
222221
"add": {
223-
"index": "my-index-2099.05.06-000001",
224-
"alias": "my-alias"
222+
"index": "logs-nginx.access-prod",
223+
"alias": "logs"
225224
}
226225
},
227226
{
228227
"add": {
229-
"index": "my-index-2099.05.07-000002",
230-
"alias": "my-alias",
228+
"index": "logs-my_app-default",
229+
"alias": "logs",
231230
"is_write_index": true
232231
}
233232
}
234233
]
235234
}
236235
----
237-
// TEST[s/^/PUT my-index-2099.05.06-000001\nPUT my-index-2099.05.07-000002\n/]
236+
// TEST[s/^/PUT _data_stream\/logs-nginx.access-prod\nPUT _data_stream\/logs-my_app-default\n/]
237+
238+
If an alias points to multiple indices or data streams and `is_write_index`
239+
isn't set, the alias rejects write requests. If an index alias points to one
240+
index and `is_write_index` isn't set, the index automatically acts as the write
241+
index. Data stream aliases don't automatically set a write data stream, even if
242+
the alias points to one data stream.
238243

239244
TIP: We recommend using data streams to store append-only time series data. If
240245
you frequently update or delete existing time series data, use an index alias
241246
with a write index instead. See
242247
<<manage-time-series-data-without-data-streams>>.
243248

244-
If an alias points to multiple indices with no write index, the alias rejects
245-
write requests. If an alias points to one index and `is_write_index` is not set,
246-
the index automatically acts as the write index.
247-
248249
[discrete]
249250
[[filter-alias]]
250251
=== Filter an alias
@@ -259,23 +260,33 @@ POST _aliases
259260
"actions": [
260261
{
261262
"add": {
262-
"index": "my-index-2099.05.07-000002",
263+
"index": "my-index-2099.05.06-000001",
263264
"alias": "my-alias",
264-
"is_write_index": true,
265265
"filter": {
266-
"range": {
267-
"@timestamp": {
268-
"gte": "now-1d/d",
269-
"lt": "now/d"
270-
}
266+
"bool": {
267+
"filter": [
268+
{
269+
"range": {
270+
"@timestamp": {
271+
"gte": "now-1d/d",
272+
"lt": "now/d"
273+
}
274+
}
275+
},
276+
{
277+
"term": {
278+
"user.id": "kimchy"
279+
}
280+
}
281+
]
271282
}
272283
}
273284
}
274285
}
275286
]
276287
}
277288
----
278-
// TEST[s/^/PUT my-index-2099.05.07-000002\n/]
289+
// TEST[s/^/PUT my-index-2099.05.06-000001\n/]
279290

280291
[discrete]
281292
[[alias-routing]]

docs/reference/ilm/apis/put-lifecycle.asciidoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,23 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
4747
[[ilm-put-lifecycle-example]]
4848
==== {api-examples-title}
4949

50-
The following example creates a new policy named `my_policy`:
50+
The following example creates a new policy named `my_policy`. In addition, you can use the
51+
`_meta` parameter to add arbitrary metadata to the policy, the `_meta` parameter is optional
52+
and not automatically generated or used by Elasticsearch. To unset `_meta`, replace the policy
53+
without specifying one. To check the `_meta`, you can use the <<ilm-get-lifecycle,Get lifecycle policy>> API.
5154

5255
[source,console]
5356
--------------------------------------------------
5457
PUT _ilm/policy/my_policy
5558
{
5659
"policy": {
60+
"_meta": {
61+
"description": "used for nginx log",
62+
"project": {
63+
"name": "myProject",
64+
"department": "myDepartment"
65+
}
66+
},
5767
"phases": {
5868
"warm": {
5969
"min_age": "10d",

docs/reference/index.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
:include-xpack: true
55
:es-test-dir: {elasticsearch-root}/docs/src/test
66
:plugins-examples-dir: {elasticsearch-root}/plugins/examples
7-
:dependencies-dir: {elasticsearch-root}/buildSrc
7+
:dependencies-dir: {elasticsearch-root}/build-tools-internal
88
:xes-repo-dir: {elasticsearch-root}/x-pack/docs/{lang}
99
:es-repo-dir: {elasticsearch-root}/docs/reference
1010

0 commit comments

Comments
 (0)