Skip to content

Commit 09bafe7

Browse files
authored
Merge branch 'main' into fix/128577-main
2 parents 4fb4dfb + d597e50 commit 09bafe7

File tree

75 files changed

+2608
-1424
lines changed

Some content is hidden

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

75 files changed

+2608
-1424
lines changed

.buildkite/pipelines/periodic-micro-benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
steps:
22
- label: periodic-micro-benchmarks
33
command: |
4-
.ci/scripts/run-gradle.sh -p benchmarks/ run --args 'org.elasticsearch.benchmark._nightly -rf json -rff build/result.json'
4+
.ci/scripts/run-gradle.sh :benchmarks:run --args 'org.elasticsearch.benchmark._nightly -rf json -rff build/result.json'
55
timeout_in_minutes: 300
66
agents:
77
provider: gcp

.ci/scripts/run-gradle.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ else
4141
fi
4242

4343
set -e
44-
$GRADLEW -S --max-workers=$MAX_WORKERS $@
44+
$GRADLEW -S --max-workers=$MAX_WORKERS "$@"

docs/changelog/128362.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128362
2+
summary: Avoid unnecessary determinization in index pattern conflict checks
3+
area: Indices APIs
4+
type: bug
5+
issues: []

docs/changelog/128405.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128405
2+
summary: Modify the mechanism to pause indexing
3+
area: Distributed
4+
type: bug
5+
issues: []

docs/changelog/128650.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 128650
2+
summary: Update shardGenerations for all indices on snapshot finalization
3+
area: Snapshot/Restore
4+
type: enhancement
5+
issues:
6+
- 108907

docs/reference/enrich-processor/dissect-processor.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ and result in a document with the following fields:
4646

4747
A dissect pattern is defined by the parts of the string that will be discarded. In the previous example, the first part to be discarded is a single space. Dissect finds this space, then assigns the value of `clientip` everything up until that space. Next, dissect matches the `[` and then `]` and then assigns `@timestamp` to everything in-between `[` and `]`. Paying special attention to the parts of the string to discard will help build successful dissect patterns.
4848

49-
Successful matches require all keys in a pattern to have a value. If any of the `%{{keyname}}` defined in the pattern do not have a value, then an exception is thrown and may be handled by the [`on_failure`](docs-content://manage-data/ingest/transform-enrich/ingest-pipelines.md#handling-pipeline-failures) directive. An empty key `%{}` or a [named skip key](#dissect-modifier-named-skip-key) can be used to match values, but exclude the value from the final document. All matched values are represented as string data types. The [convert processor](/reference/enrich-processor/convert-processor.md) may be used to convert to expected data type.
49+
Successful matches require all keys in a pattern to have a value. If any of the `%{keyname}` defined in the pattern do not have a value, then an exception is thrown and may be handled by the [`on_failure`](docs-content://manage-data/ingest/transform-enrich/ingest-pipelines.md#handling-pipeline-failures) directive. An empty key `%{}` or a [named skip key](#dissect-modifier-named-skip-key) can be used to match values, but exclude the value from the final document. All matched values are represented as string data types. The [convert processor](/reference/enrich-processor/convert-processor.md) may be used to convert to expected data type.
5050

5151
Dissect also supports [key modifiers](#dissect-key-modifiers) that can change dissect’s default behavior. For example you can instruct dissect to ignore certain fields, append fields, skip over padding, etc. See [below](#dissect-key-modifiers) for more information.
5252

@@ -75,7 +75,7 @@ $$$dissect-options$$$
7575

7676
## Dissect key modifiers [dissect-key-modifiers]
7777

78-
Key modifiers can change the default behavior for dissection. Key modifiers may be found on the left or right of the `%{{keyname}}` always inside the `%{` and `}`. For example `%{+keyname ->}` has the append and right padding modifiers.
78+
Key modifiers can change the default behavior for dissection. Key modifiers may be found on the left or right of the `%{keyname}` always inside the `%{` and `}`. For example `%{+keyname ->}` has the append and right padding modifiers.
7979

8080
$$$dissect-key-modifiers-table$$$
8181

@@ -89,9 +89,9 @@ $$$dissect-key-modifiers-table$$$
8989

9090
### Right padding modifier (`->`) [dissect-modifier-skip-right-padding]
9191

92-
The algorithm that performs the dissection is very strict in that it requires all characters in the pattern to match the source string. For example, the pattern `%{{fookey}} %{{barkey}}` (1 space), will match the string "foo bar" (1 space), but will not match the string "foo bar" (2 spaces) since the pattern has only 1 space and the source string has 2 spaces.
92+
The algorithm that performs the dissection is very strict in that it requires all characters in the pattern to match the source string. For example, the pattern `%{fookey} %{barkey}` (1 space), will match the string "foo bar" (1 space), but will not match the string "foo bar" (2 spaces) since the pattern has only 1 space and the source string has 2 spaces.
9393

94-
The right padding modifier helps with this case. Adding the right padding modifier to the pattern `%{fookey->} %{{barkey}}`, It will now will match "foo bar" (1 space) and "foo bar" (2 spaces) and even "foo bar" (10 spaces).
94+
The right padding modifier helps with this case. Adding the right padding modifier to the pattern `%{fookey->} %{barkey}`, It will now will match "foo bar" (1 space) and "foo bar" (2 spaces) and even "foo bar" (10 spaces).
9595

9696
Use the right padding modifier to allow for repetition of the characters after a `%{keyname->}`.
9797

@@ -101,7 +101,7 @@ Right padding modifier example
101101

102102
| | |
103103
| --- | --- |
104-
| **Pattern** | `%{ts->} %{{level}}` |
104+
| **Pattern** | `%{ts->} %{level}` |
105105
| **Input** | 1998-08-10T17:15:42,466 WARN |
106106
| **Result** | * ts = 1998-08-10T17:15:42,466<br>* level = WARN<br> |
107107

@@ -111,7 +111,7 @@ Right padding modifier with empty key example
111111

112112
| | |
113113
| --- | --- |
114-
| **Pattern** | `[%{{ts}}]%{->}[%{{level}}]` |
114+
| **Pattern** | `[%{ts}]%{->}[%{level}]` |
115115
| **Input** | [1998-08-10T17:15:42,466] [WARN] |
116116
| **Result** | * ts = 1998-08-10T17:15:42,466<br>* level = WARN<br> |
117117

@@ -153,7 +153,7 @@ Named skip key modifier example
153153

154154
| | |
155155
| --- | --- |
156-
| **Pattern** | `%{{clientip}} %{?ident} %{?auth} [%{@timestamp}]` |
156+
| **Pattern** | `%{clientip} %{?ident} %{?auth} [%{@timestamp}]` |
157157
| **Input** | 1.2.3.4 - - [30/Apr/1998:22:00:52 +0000] |
158158
| **Result** | * clientip = 1.2.3.4<br>* @timestamp = 30/Apr/1998:22:00:52 +0000<br> |
159159

@@ -167,7 +167,7 @@ Reference key modifier example
167167

168168
| | |
169169
| --- | --- |
170-
| **Pattern** | `[%{{ts}}] [%{{level}}] %{*p1}:%{&p1} %{*p2}:%{&p2}` |
170+
| **Pattern** | `[%{ts}] [%{level}] %{*p1}:%{&p1} %{*p2}:%{&p2}` |
171171
| **Input** | [2018-08-10T17:15:42,466] [ERR] ip:1.2.3.4 error:REFUSED |
172172
| **Result** | * ts = 2018-08-10T17:15:42,466<br>* level = ERR<br>* ip = 1.2.3.4<br>* error = REFUSED<br> |
173173

docs/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ GET /_search
2929
`analyzer`
3030
: (Optional, string) [Analyzer](docs-content://manage-data/data-store/text-analysis.md) used to convert the text in the `query` value into tokens. Defaults to the [index-time analyzer](docs-content://manage-data/data-store/text-analysis/specify-an-analyzer.md#specify-index-time-analyzer) mapped for the `<field>`. If no analyzer is mapped, the index’s default analyzer is used.
3131

32+
`boost`
33+
: (Optional, float) Floating point number used to decrease or increase the [relevance scores](/reference/query-languages/query-dsl/query-filter-context.md#relevance-scores) of the query. Defaults to `1.0`.
34+
Boost values are relative to the default value of `1.0`. A boost value between `0` and `1.0` decreases the relevance score. A value greater than `1.0` increases the relevance score.
35+
3236
`slop`
3337
: (Optional, integer) Maximum number of positions allowed between matching tokens. Defaults to `0`. Transposed terms have a slop of `2`.
3438

docs/release-notes/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ To check for security updates, go to [Security announcements for the Elastic sta
2020
% ### Fixes [elasticsearch-next-fixes]
2121
% *
2222

23+
## 9.0.2 [elasticsearch-9.0.2-release-notes]
2324
```{applies_to}
2425
stack: coming 9.0.2
2526
```
26-
## 9.0.2 [elasticsearch-9.0.2-release-notes]
2727

2828
### Features and enhancements [elasticsearch-9.0.2-features-enhancements]
2929

libs/entitlement/src/main/java/module-info.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
requires static org.elasticsearch.entitlement.bridge; // At runtime, this will be in java.base
2121

2222
exports org.elasticsearch.entitlement.runtime.api;
23-
exports org.elasticsearch.entitlement.runtime.policy;
24-
exports org.elasticsearch.entitlement.runtime.policy.entitlements to org.elasticsearch.server;
2523
exports org.elasticsearch.entitlement.instrumentation;
2624
exports org.elasticsearch.entitlement.bootstrap to org.elasticsearch.server;
2725
exports org.elasticsearch.entitlement.initialization to java.base;
2826

27+
// TODO: Most of the things in the policy package should be internal implementation details that are not exported.
28+
exports org.elasticsearch.entitlement.runtime.policy;
29+
exports org.elasticsearch.entitlement.runtime.policy.entitlements to org.elasticsearch.server;
30+
2931
uses org.elasticsearch.entitlement.instrumentation.InstrumentationService;
3032
}

libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
import com.sun.tools.attach.AttachNotSupportedException;
1515
import com.sun.tools.attach.VirtualMachine;
1616

17-
import org.elasticsearch.core.Nullable;
1817
import org.elasticsearch.core.PathUtils;
1918
import org.elasticsearch.core.SuppressForbidden;
2019
import org.elasticsearch.entitlement.initialization.EntitlementInitialization;
21-
import org.elasticsearch.entitlement.runtime.policy.PathLookup;
2220
import org.elasticsearch.entitlement.runtime.policy.PathLookupImpl;
2321
import org.elasticsearch.entitlement.runtime.policy.Policy;
2422
import org.elasticsearch.entitlement.runtime.policy.PolicyManager;
@@ -33,35 +31,11 @@
3331
import java.util.function.Function;
3432
import java.util.stream.Stream;
3533

36-
import static java.util.Objects.requireNonNull;
37-
3834
public class EntitlementBootstrap {
3935

40-
public record BootstrapArgs(
41-
@Nullable Policy serverPolicyPatch,
42-
Map<String, Policy> pluginPolicies,
43-
Function<Class<?>, PolicyManager.PolicyScope> scopeResolver,
44-
PathLookup pathLookup,
45-
Map<String, Path> sourcePaths,
46-
Set<Package> suppressFailureLogPackages
47-
) {
48-
public BootstrapArgs {
49-
requireNonNull(pluginPolicies);
50-
requireNonNull(scopeResolver);
51-
requireNonNull(pathLookup);
52-
requireNonNull(sourcePaths);
53-
requireNonNull(suppressFailureLogPackages);
54-
}
55-
}
56-
57-
private static BootstrapArgs bootstrapArgs;
58-
59-
public static BootstrapArgs bootstrapArgs() {
60-
return bootstrapArgs;
61-
}
62-
6336
/**
64-
* Activates entitlement checking. Once this method returns, calls to methods protected by Entitlements from classes without a valid
37+
* Main entry point that activates entitlement checking. Once this method returns,
38+
* calls to methods protected by entitlements from classes without a valid
6539
* policy will throw {@link org.elasticsearch.entitlement.runtime.api.NotEntitledException}.
6640
*
6741
* @param serverPolicyPatch a policy with additional entitlements to patch the embedded server layer policy
@@ -98,10 +72,10 @@ public static void bootstrap(
9872
Set<Package> suppressFailureLogPackages
9973
) {
10074
logger.debug("Loading entitlement agent");
101-
if (EntitlementBootstrap.bootstrapArgs != null) {
102-
throw new IllegalStateException("plugin data is already set");
75+
if (EntitlementInitialization.initializeArgs != null) {
76+
throw new IllegalStateException("initialization data is already set");
10377
}
104-
EntitlementBootstrap.bootstrapArgs = new BootstrapArgs(
78+
EntitlementInitialization.initializeArgs = new EntitlementInitialization.InitializeArgs(
10579
serverPolicyPatch,
10680
pluginPolicies,
10781
scopeResolver,

0 commit comments

Comments
 (0)