Skip to content

Commit fcfd243

Browse files
authored
Merge branch 'main' into esql-kql-optional-parameters
2 parents 14d95ec + 3fcd348 commit fcfd243

File tree

46 files changed

+1341
-268
lines changed

Some content is hidden

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

46 files changed

+1341
-268
lines changed

docs/changelog/135873.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 135873
2+
summary: Convert `BytesTransportResponse` when proxying response from/to local node
3+
area: "Network"
4+
type: bug
5+
issues: []

docs/reference/query-languages/esql/_snippets/functions/parameters/top.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/types/top.md

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/images/functions/top.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/reference/query-languages/esql/kibana/definition/functions/top.json

Lines changed: 160 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/src/internalClusterTest/java/org/elasticsearch/snapshots/SnapshotShutdownIT.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
494494
final var indexName = randomIdentifier();
495495
createIndexWithContent(indexName, indexSettings(numShards, 0).put(REQUIRE_NODE_NAME_SETTING, nodeForRemoval).build());
496496
indexAllShardsToAnEqualOrGreaterMinimumSize(indexName, ByteSizeValue.of(2, ByteSizeUnit.KB).getBytes());
497-
logger.info("---> nodeForRemovalId: " + nodeForRemovalId + ", numShards: " + numShards);
498497

499498
// Start the snapshot with blocking in place on the data node not to allow shard snapshots to finish yet.
500499
final var clusterService = internalCluster().getCurrentMasterNodeInstance(ClusterService.class);
@@ -504,21 +503,7 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
504503

505504
waitForBlock(otherNode, repoName);
506505

507-
// Block on the master when a shard snapshot request comes in, until we can verify that the Tracker saw the outgoing request.
508-
final CountDownLatch snapshotStatusUpdateLatch = new CountDownLatch(1);
509-
final var masterTransportService = MockTransportService.getInstance(internalCluster().getMasterName());
510-
masterTransportService.addRequestHandlingBehavior(
511-
TransportUpdateSnapshotStatusAction.NAME,
512-
(handler, request, channel, task) -> masterTransportService.getThreadPool().generic().execute(() -> {
513-
safeAwait(snapshotStatusUpdateLatch);
514-
try {
515-
handler.messageReceived(request, channel, task);
516-
} catch (Exception e) {
517-
fail(e);
518-
}
519-
})
520-
);
521-
506+
logger.info("---> nodeForRemovalId: " + nodeForRemovalId + ", numShards: " + numShards);
522507
mockLog.addExpectation(
523508
new MockLog.SeenEventExpectation(
524509
"SnapshotShutdownProgressTracker start log message",
@@ -566,6 +551,21 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
566551
mockLog.awaitAllExpectationsMatched();
567552
resetMockLog();
568553

554+
// Block on the master when a shard snapshot request comes in, until we can verify that the Tracker saw the outgoing request.
555+
final CountDownLatch snapshotStatusUpdateLatch = new CountDownLatch(1);
556+
final var masterTransportService = MockTransportService.getInstance(internalCluster().getMasterName());
557+
masterTransportService.addRequestHandlingBehavior(
558+
TransportUpdateSnapshotStatusAction.NAME,
559+
(handler, request, channel, task) -> masterTransportService.getThreadPool().generic().execute(() -> {
560+
safeAwait(snapshotStatusUpdateLatch);
561+
try {
562+
handler.messageReceived(request, channel, task);
563+
} catch (Exception e) {
564+
fail(e);
565+
}
566+
})
567+
);
568+
569569
mockLog.addExpectation(
570570
new MockLog.SeenEventExpectation(
571571
"SnapshotShutdownProgressTracker shard snapshot has paused log message",

server/src/main/java/org/elasticsearch/ElasticsearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
import static org.elasticsearch.cluster.metadata.IndexMetadata.INDEX_UUID_NA_VALUE;
8181
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken;
8282
import static org.elasticsearch.common.xcontent.XContentParserUtils.ensureFieldName;
83-
import static org.elasticsearch.search.crossproject.IndexExpressionsRewriter.NO_MATCHING_PROJECT_EXCEPTION_VERSION;
83+
import static org.elasticsearch.search.crossproject.CrossProjectIndexExpressionsRewriter.NO_MATCHING_PROJECT_EXCEPTION_VERSION;
8484

8585
/**
8686
* A base class for all elasticsearch exceptions.

server/src/main/java/org/elasticsearch/action/IndicesRequest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ default ResolvedIndexExpressions getResolvedIndexExpressions() {
8080
default boolean allowsRemoteIndices() {
8181
return false;
8282
}
83+
84+
/**
85+
* Determines whether the request type allows cross-project processing. Cross-project processing entails cross-project search
86+
* index resolution and error handling. Note: this method only determines in the request _supports_ cross-project.
87+
* Whether cross-project processing is actually performed is determined by {@link IndicesOptions}.
88+
*/
89+
default boolean allowsCrossProject() {
90+
return false;
91+
}
8392
}
8493

8594
/**

0 commit comments

Comments
 (0)