Skip to content

Commit ec6d9fe

Browse files
committed
Merge remote-tracking branch 'upstream/main' into multi_proj_file_auth
2 parents 388521c + 2026ce3 commit ec6d9fe

File tree

29 files changed

+190
-338
lines changed

29 files changed

+190
-338
lines changed

.buildkite/pipelines/periodic.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ steps:
218218
ES_VERSION:
219219
- "9.0.0"
220220
ES_COMMIT:
221-
- "b2cc9d9b8f00ee621f93ddca07ea9c671aab1578" # update to match last commit before lucene bump
221+
- "10352e57d85505984582616e1e38530d3ec6ca59" # update to match last commit before lucene bump maintained from combat-lucene-10-0-0 branch
222222
agents:
223223
provider: gcp
224224
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ steps:
637637
ES_VERSION:
638638
- "9.0.0"
639639
ES_COMMIT:
640-
- "b2cc9d9b8f00ee621f93ddca07ea9c671aab1578" # update to match last commit before lucene bump
640+
- "10352e57d85505984582616e1e38530d3ec6ca59" # update to match last commit before lucene bump maintained from combat-lucene-10-0-0 branch
641641
agents:
642642
provider: gcp
643643
image: family/elasticsearch-ubuntu-2004

docs/changelog/122885.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 122885
2+
summary: Run `TransportExplainLifecycleAction` on local node
3+
area: ILM+SLM
4+
type: enhancement
5+
issues: []

server/src/main/java/org/elasticsearch/action/search/CCSSingleCoordinatorSearchProgressListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void onPartialReduce(List<SearchShard> shards, TotalHits totalHits, Inter
188188

189189
for (Map.Entry<String, Integer> entry : totalByClusterAlias.entrySet()) {
190190
String clusterAlias = entry.getKey();
191-
int successfulCount = entry.getValue().intValue();
191+
int successfulCount = entry.getValue();
192192

193193
clusters.swapCluster(clusterAlias, (k, v) -> {
194194
SearchResponse.Cluster.Status status = v.getStatus();
@@ -231,7 +231,7 @@ public void onFinalReduce(List<SearchShard> shards, TotalHits totalHits, Interna
231231

232232
for (Map.Entry<String, Integer> entry : totalByClusterAlias.entrySet()) {
233233
String clusterAlias = entry.getKey();
234-
int successfulCount = entry.getValue().intValue();
234+
int successfulCount = entry.getValue();
235235

236236
clusters.swapCluster(clusterAlias, (k, v) -> {
237237
SearchResponse.Cluster.Status status = v.getStatus();

server/src/main/java/org/elasticsearch/action/search/CountOnlyQueryPhaseResultConsumer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
* store any other information.
2828
*/
2929
class CountOnlyQueryPhaseResultConsumer extends SearchPhaseResults<SearchPhaseResult> {
30-
AtomicReference<TotalHits.Relation> relationAtomicReference = new AtomicReference<>(TotalHits.Relation.EQUAL_TO);
31-
LongAdder totalHits = new LongAdder();
30+
final AtomicReference<TotalHits.Relation> relationAtomicReference = new AtomicReference<>(TotalHits.Relation.EQUAL_TO);
31+
final LongAdder totalHits = new LongAdder();
3232

3333
private final AtomicBoolean terminatedEarly = new AtomicBoolean(false);
3434
private final AtomicBoolean timedOut = new AtomicBoolean(false);

server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,6 @@ public SearchRequestBuilder setWaitForCheckpoints(Map<String, long[]> waitForChe
121121
return this;
122122
}
123123

124-
/**
125-
* Set the timeout for the {@link #setWaitForCheckpoints(Map)} request.
126-
*/
127-
public SearchRequestBuilder setWaitForCheckpointsTimeout(final TimeValue waitForCheckpointsTimeout) {
128-
request.setWaitForCheckpointsTimeout(waitForCheckpointsTimeout);
129-
return this;
130-
}
131-
132124
/**
133125
* Specifies what type of requested indices to ignore and wildcard indices expressions.
134126
* <p>

server/src/main/java/org/elasticsearch/action/search/SearchResponse.java

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ public boolean hasPartialResults() {
786786
* for tracking search Cluster details.
787787
*/
788788
public boolean hasClusterObjects() {
789-
return clusterInfo.keySet().size() > 0;
789+
return clusterInfo.isEmpty() == false;
790790
}
791791

792792
/**
@@ -855,27 +855,6 @@ public Cluster(String clusterAlias, String indexExpression, boolean skipUnavaila
855855
this(clusterAlias, indexExpression, skipUnavailable, Status.RUNNING, null, null, null, null, null, null, false);
856856
}
857857

858-
/**
859-
* Create a Cluster with a new Status and one or more ShardSearchFailures. This constructor
860-
* should only be used for fatal failures where shard counters (total, successful, skipped, failed)
861-
* are not known (unset).
862-
* @param clusterAlias clusterAlias as defined in the remote cluster settings or RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY
863-
* for the local cluster
864-
* @param indexExpression the original (not resolved/concrete) indices expression provided for this cluster.
865-
* @param skipUnavailable whether cluster is marked as skip_unavailable in remote cluster settings
866-
* @param status current status of the search on this Cluster
867-
* @param failures list of failures that occurred during the search on this Cluster
868-
*/
869-
public Cluster(
870-
String clusterAlias,
871-
String indexExpression,
872-
boolean skipUnavailable,
873-
Status status,
874-
List<ShardSearchFailure> failures
875-
) {
876-
this(clusterAlias, indexExpression, skipUnavailable, status, null, null, null, null, failures, null, false);
877-
}
878-
879858
public Cluster(
880859
String clusterAlias,
881860
String indexExpression,
@@ -1034,7 +1013,7 @@ public void writeTo(StreamOutput out) throws IOException {
10341013
@Override
10351014
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
10361015
String name = clusterAlias;
1037-
if (clusterAlias.equals("")) {
1016+
if (clusterAlias.isEmpty()) {
10381017
name = LOCAL_CLUSTER_NAME_REPRESENTATION;
10391018
}
10401019
builder.startObject(name);

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,28 @@ public boolean hasMixedSystemIndexVersions() {
350350
.anyMatch(e -> e.systemIndexMappingsVersion().equals(minVersions.systemIndexMappingsVersion()) == false);
351351
}
352352

353+
/**
354+
* @return the minimum {@link TransportVersion} that will be used for all future intra-cluster node-to-node communications. This value
355+
* only ever increases, so if {@code v.onOrAfter(cs.getMinTransportVersion())} is true once then it will remain true in the
356+
* future.
357+
* <p>
358+
* There are some subtle exceptions:
359+
* <ul>
360+
* <li>The "only ever increases" property is handled by the master node using the in-memory (ephemeral) part of the
361+
* {@link ClusterState} only, so in theory a full restart of a mixed-version cluster may lose that state and allow some nodes to see
362+
* this value decrease. For this to happen in practice requires some fairly unlucky timing during the initial master election. We
363+
* tell users not to do this: if something breaks during a rolling upgrade then they should upgrade all remaining nodes to continue.
364+
* But we do not enforce it.
365+
* <li>The "used for all node-to-node communications" is false in a disordered upgrade (an upgrade to a semantically-newer but
366+
* chronologically-older version) because for each connection between such nodes we will use {@link
367+
* TransportVersion#bestKnownVersion} to pick a transport version which is known by both endpoints. We tell users not to do
368+
* disordered upgrades too, but do not enforce it.
369+
* </ul>
370+
* <p>
371+
* Note also that node-to-node communications which are not <i>intra-cluster</i> (i.e. they are not between nodes in the same cluster)
372+
* may sometimes use an earlier {@link TransportVersion} than this value. This includes remote-cluster communication, and communication
373+
* with nodes that are just starting up or otherwise are attempting to join this cluster.
374+
*/
353375
public TransportVersion getMinTransportVersion() {
354376
return this.minVersions.transportVersion();
355377
}

server/src/main/java/org/elasticsearch/search/aggregations/bucket/range/InternalDateRange.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import org.elasticsearch.common.io.stream.StreamInput;
1212
import org.elasticsearch.search.DocValueFormat;
13-
import org.elasticsearch.search.aggregations.InternalAggregation;
1413
import org.elasticsearch.search.aggregations.InternalAggregations;
1514

1615
import java.io.IOException;
@@ -25,10 +24,6 @@ public class InternalDateRange extends InternalRange<InternalDateRange.Bucket, I
2524

2625
public static class Bucket extends InternalRange.Bucket {
2726

28-
public Bucket(String key, double from, double to, long docCount, List<InternalAggregation> aggregations, DocValueFormat formatter) {
29-
super(key, from, to, docCount, InternalAggregations.from(aggregations), formatter);
30-
}
31-
3227
public Bucket(String key, double from, double to, long docCount, InternalAggregations aggregations, DocValueFormat formatter) {
3328
super(key, from, to, docCount, aggregations, formatter);
3429
}

server/src/main/java/org/elasticsearch/search/builder/PointInTimeBuilder.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ public PointInTimeBuilder setKeepAlive(TimeValue keepAlive) {
124124
return this;
125125
}
126126

127-
/**
128-
* If specified, the search layer will keep this point in time around for at least the given keep-alive.
129-
* Otherwise, the point in time will be kept around until the original keep alive elapsed.
130-
*/
131-
public PointInTimeBuilder setKeepAlive(String keepAlive) {
132-
return setKeepAlive(TimeValue.parseTimeValue(keepAlive, "keep_alive"));
133-
}
134-
135127
@Nullable
136128
public TimeValue getKeepAlive() {
137129
return keepAlive;

0 commit comments

Comments
 (0)