-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Propagate SplitShardCountSummary to ESQL data nodes #137773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5455282
d5df28f
a26a84e
f3cd34d
9232014
1e70560
3903f0d
abea0e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,11 +196,18 @@ public static long computeWaitForCheckpoint(Map<String, long[]> indexToWaitForCh | |
|
|
||
| // Used by ValidateQueryAction, ExplainAction, FieldCaps, TermsEnumAction, lookup join in ESQL | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted, additional handling may be needed for lookup join.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, resizing lookup indices is not allowed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RIght, thanks. I think i would like to still pass the summary if it's available in that context just to avoid inconsistency. It would be a follow up anyway. |
||
| public ShardSearchRequest(ShardId shardId, long nowInMillis, AliasFilter aliasFilter) { | ||
| this(shardId, nowInMillis, aliasFilter, null); | ||
| // TODO fix SplitShardCountSummary | ||
| this(shardId, nowInMillis, aliasFilter, null, SplitShardCountSummary.UNSET); | ||
| } | ||
|
|
||
| // Used by ESQL and field_caps API | ||
| public ShardSearchRequest(ShardId shardId, long nowInMillis, AliasFilter aliasFilter, String clusterAlias) { | ||
| public ShardSearchRequest( | ||
| ShardId shardId, | ||
| long nowInMillis, | ||
| AliasFilter aliasFilter, | ||
| String clusterAlias, | ||
| SplitShardCountSummary reshardSplitShardCountSummary | ||
| ) { | ||
| this( | ||
| OriginalIndices.NONE, | ||
| shardId, | ||
|
|
@@ -220,10 +227,7 @@ public ShardSearchRequest(ShardId shardId, long nowInMillis, AliasFilter aliasFi | |
| SequenceNumbers.UNASSIGNED_SEQ_NO, | ||
| SearchService.NO_TIMEOUT, | ||
| false, | ||
| // This parameter is specific to the resharding feature. | ||
| // TODO | ||
| // It is currently only supported in _search API and is stubbed here as a result. | ||
| SplitShardCountSummary.UNSET | ||
| reshardSplitShardCountSummary | ||
| ); | ||
| } | ||
|
|
||
|
|
@@ -363,7 +367,7 @@ public ShardSearchRequest(StreamInput in) throws IOException { | |
| forceSyntheticSource = false; | ||
| } | ||
| if (in.getTransportVersion().supports(SHARD_SEARCH_REQUEST_RESHARD_SHARD_COUNT_SUMMARY)) { | ||
| reshardSplitShardCountSummary = SplitShardCountSummary.fromInt(in.readVInt()); | ||
| reshardSplitShardCountSummary = new SplitShardCountSummary(in); | ||
| } else { | ||
| reshardSplitShardCountSummary = SplitShardCountSummary.UNSET; | ||
| } | ||
|
|
@@ -429,7 +433,7 @@ protected final void innerWriteTo(StreamOutput out, boolean asKey) throws IOExce | |
| } | ||
| } | ||
| if (out.getTransportVersion().supports(SHARD_SEARCH_REQUEST_RESHARD_SHARD_COUNT_SUMMARY)) { | ||
| out.writeVInt(reshardSplitShardCountSummary.asInt()); | ||
| reshardSplitShardCountSummary.writeTo(out); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 9217000 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| esql_execution_metadata,9216000 | ||
| resharding_shard_summary_in_esql,9217000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can open a PR to remove this BWC after your PR, as it is no longer needed in 9.x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, we don't allow CCS between majors?