Skip to content

[ESQL] Improve skip_unavailable description in CCS doc #1919

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

smalyshev
Copy link
Contributor

Improve the description to match 9.1 GA semantics

@smalyshev smalyshev requested review from a team as code owners June 25, 2025 22:17
Copy link

github-actions bot commented Jun 25, 2025

🔍 Preview links for changed docs:

🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes.

Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few suggestions and questions, was also wondering if you could just bundle this into your other PR? #maybe? :)

@@ -470,10 +470,27 @@ FROM my-index-000001,cluster*:my-index-*,cluster_three:-my-index-000001


## Optional remote clusters [ccq-skip-unavailable-clusters]
```{applies_to}
stack: ga 9.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stack: ga 9.1
stack: preview 9.0, ga 9.1

this isn't brand new and the docs now cover all 9.x versions, so the reader might be on 9.0 or 9.1 so we need to maintain lifecycle information

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but if the entire page is marked preview 9.0, GA 9.1, you might not need this section-level tag at all?

Copy link
Contributor Author

@smalyshev smalyshev Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is different thing, because what is described here is correct only for 9.1, it works differently in 9.0. The point is not that it's preview in 9.0, it just doesn't work the way this paragraph describes in 9.0.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK thanks for clarifying :) Let me check on what the best way to handle this is then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smalyshev in this case you should use tabs to house the 9.0 and 9.1 differences:

::::{tab-set}

:::{tab-item} 9.0
This is where the content for tab #1 goes.
:::

:::{tab-item} 9.1
This is where the content for tab #2 goes.
:::

::::

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. I'll try that.

Comment on lines 477 to 478
If the remote cluster is configured with `skip_unavailable: true` (the default setting), the cluster would be set
to `skipped` or `partial` status but the query will not fail, if:
Copy link
Contributor

@leemthompo leemthompo Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the remote cluster is configured with `skip_unavailable: true` (the default setting), the cluster would be set
to `skipped` or `partial` status but the query will not fail, if:
Remote clusters are configured with `skip_unavailable: true` by default. With this setting, the cluster will be marked as `skipped` or `partial` instead of causing query failures:
* `skipped` means the cluster was unavailable and no data was returned
* `partial` means some data was returned despite errors during the query
This means queries won't fail if:
* The remote cluster disconnects from the querying cluster (before or during query execution)
* The remote cluster lacks the requested index
* An error occurs during query processing on the remote cluster

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attempt to improve readability

* The remote cluster does not have the requested index.
* An error happened while processing the query on the remote cluster.

The `partial` status will be used if the remote query was partially successful and some data was returned.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `partial` status will be used if the remote query was partially successful and some data was returned.

I suggested explaining skipped and partial in the opening section, so can remove this if accept that :)

Comment on lines 486 to 487
This however does not apply to the situation when the remote cluster is missing an index and this is the only index in the query,
or all the indices in the query are missing. For example, the following queries will fail:
Copy link
Contributor

@leemthompo leemthompo Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first sentence is a little hard to read, I wonder if we can boil it town to a simpler message:

Queries will still fail when skip_unavailable: true, if none of the specified indices exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a candidate for an admonition

Comment on lines +490 to +493
FROM cluster_one:missing-index | LIMIT 10
FROM cluster_one:missing-index* | LIMIT 10
FROM cluster_one:missing-index*,cluster_two:missing-index | LIMIT 10
```
Copy link
Contributor

@leemthompo leemthompo Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM cluster_one:missing-index | LIMIT 10
FROM cluster_one:missing-index* | LIMIT 10
FROM cluster_one:missing-index*,cluster_two:missing-index | LIMIT 10
```
FROM cluster_one:missing-index <1>
FROM cluster_one:missing-index* <2>
FROM cluster_one:missing-index*,cluster_two:missing-index <3>
```
1. Single missing index on one cluster
2. Index pattern that matches nothing
3. All indices and index patterns missing across every cluster

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotating the query might nice, clean way to explain it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the previous text already explains it, do we really need to supply that much detail? It's just different examples of how to write missing indices, after all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it hurts to be super clear, and personally I really like annotated examples —specially for non-experts.

But I leave this totally up to your discretion! :)

@leemthompo leemthompo changed the title Improve skip_un description [ESQL] Improve skip_unavailable description in CCS doc Jun 26, 2025
Copy link
Contributor

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor readability issues to clear up and I think this will be good to go. Thanks for iterating :)

* The remote cluster does not have the requested index, or it is not accessible due to security settings.
* An error happened while processing the query on the remote cluster.

The `partial` status will be used if the remote query was partially successful and some data may have been returned.
Copy link
Contributor

@leemthompo leemthompo Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `partial` status will be used if the remote query was partially successful and some data may have been returned.
The `partial` status means the remote query has errors, but some data may be returned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not entirely accurate, partial can result from an error, but also from interruption like async stop, which is not an error but an explicit user action.

@@ -471,9 +471,36 @@ FROM my-index-000001,cluster*:my-index-*,cluster_three:-my-index-000001

## Optional remote clusters [ccq-skip-unavailable-clusters]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cross-cluster search behavior with unavailable clusters differs between versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a word of intro for the tabs

just for a second set of eyes, @florent-leborgne let me know how you feel about this tab approach

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 Hopefully soon we will support metadata for tabs too but at least this is clear

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not only unavailable clusters, at least for 9.1 it covers a lot more errors. It is linked to how skip_unavailable option behaves, but despite it's name, it controls more than just mere un-availablity now. That's why we need the whole 9.1 section to explain that :)

@@ -471,9 +471,36 @@ FROM my-index-000001,cluster*:my-index-*,cluster_three:-my-index-000001

## Optional remote clusters [ccq-skip-unavailable-clusters]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Optional remote clusters [ccq-skip-unavailable-clusters]
## Handling unavailable remote clusters [ccq-skip-unavailable-clusters]

I don't think the current heading is super clear, feel free to tweak my suggestion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per above, it's not only unavailability. I am having hard time to find a precise word for it but basically those are the clusters that it's ok if they don't deliver perfect results or any results at all. Calling them "optional" seems to me a good approximation, but if you have better suggestions please tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants