Skip to content
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

ESQL: querying closed indices fails even with appropriate options set #106882

Open
bpintea opened this issue Mar 28, 2024 · 3 comments
Open

ESQL: querying closed indices fails even with appropriate options set #106882

bpintea opened this issue Mar 28, 2024 · 3 comments
Assignees
Labels
:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@bpintea
Copy link
Contributor

bpintea commented Mar 28, 2024

Description

Targeting a closed index (by itself or in a pattern with open indices) will fail in index resolution, irrespective of indices options.
FROM open_index,close_index OPTIONS "ignore_unavailable"="true","allow_no_indices"="true" will produce

IndicesOptions[ignore_unavailable=true, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, expand_wildcards_hidden=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=false, ignore_aliases=false, ignore_throttled=true, include_regular_indices=true, include_failure_indices=false, allow_failure_indices=true]

which will still fail with:

[2024-03-28T18:32:49,106][DEBUG][o.e.x.e.a.EsqlResponseListener] [runTask-0] Request failed with status [FORBIDDEN]: org.elasticsearch.cluster.block.ClusterBlockException: index [close_index] blocked by: [FORBIDDEN/4/index closed];
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indicesBlockedException(ClusterBlocks.java:221)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedException(ClusterBlocks.java:199)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.cluster.block.ClusterBlocks.indexBlockedRaiseException(ClusterBlocks.java:192)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.checkIndexBlocks(TransportFieldCapabilitiesAction.java:264)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.doExecuteForked(TransportFieldCapabilitiesAction.java:144)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesAction.lambda$doExecute$0(TransportFieldCapabilitiesAction.java:116)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:100)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:33)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:984)
        at org.elasticsearch.server@8.14.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1583)

Comparatively, a _search with ignore_unavailable=true will work.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 28, 2024
@bpintea
Copy link
Contributor Author

bpintea commented Mar 28, 2024

Related: #106805

@bpintea
Copy link
Contributor Author

bpintea commented Apr 23, 2024

Opened #107767.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

No branches or pull requests

2 participants