Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Changed
- Add CompletionStage variants to methods in the Client Interface and default to ActionListener impl ([#18998](https://github.com/opensearch-project/OpenSearch/pull/18998))
- IllegalArgumentException when scroll ID references a node not found in Cluster ([#19031](https://github.com/opensearch-project/OpenSearch/pull/19031))

### Fixed
- Fix unnecessary refreshes on update preparation failures ([#15261](https://github.com/opensearch-project/OpenSearch/issues/15261))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ private void run(BiFunction<String, String, DiscoveryNode> clusterNodeLookup, fi
try {
DiscoveryNode node = clusterNodeLookup.apply(target.getClusterAlias(), target.getNode());
if (node == null) {
throw new IllegalStateException("node [" + target.getNode() + "] is not available");
throw new IllegalArgumentException(
"scroll_id references node [" + target.getNode() + "] which was not found in the cluster"
);
}
connection = getConnection(target.getClusterAlias(), node);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ protected void onFirstPhaseResult(int shardId, SearchAsyncActionTests.TestSearch
latch.await();
ShardSearchFailure[] shardSearchFailures = action.buildShardFailures();
assertEquals(1, shardSearchFailures.length);
assertEquals("IllegalStateException[node [node2] is not available]", shardSearchFailures[0].reason());
assertEquals(
"IllegalArgumentException[scroll_id references node [node2] which was not found in the cluster]",
shardSearchFailures[0].reason()
);

SearchContextIdForNode[] context = scrollId.getContext();
for (int i = 0; i < results.length(); i++) {
Expand Down
Loading