[BUG] Zombie tasks on PPL cancellation
I maintainer di solito rispondono entro 1 giorno
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What is the bug?
> xh post localhost:9200/_tasks/FovWqwb5RtO-KonC0xqPkQ:17897/_cancel
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 354
Content-Type: application/json; charset=UTF-8
X-Opensearch-Version: OpenSearch/3.8.0-SNAPSHOT (opensearch)
{
"nodes": {
"FovWqwb5RtO-KonC0xqPkQ": {
"name": "integTest-0",
"transport_address": "127.0.0.1:9300",
"host": "127.0.0.1",
"ip": "127.0.0.1:9300",
"roles": [
"cluster_manager",
"data",
"ingest",
"remote_cluster_client"
],
"attributes": {
"testattr": "test",
"shard_indexing_pressure_enabled": "true"
},
"tasks": {
"FovWqwb5RtO-KonC0xqPkQ:17897": {
"node": "FovWqwb5RtO-KonC0xqPkQ",
"id": 17897,
"type": "transport",
"action": "cluster:admin/opensearch/ppl",
"start_time_in_millis": 1784762788739,
"running_time_in_nanos": 11242608694,
"cancellable": true,
"cancelled": true,
"headers": {},
"cancellation_time_millis": 1784762799982
}
}
}
}
}
> xh localhost:9200/_cat/tasks
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 280
Content-Type: text/plain; charset=UTF-8
X-Opensearch-Version: OpenSearch/3.8.0-SNAPSHOT (opensearch)
cluster:admin/opensearch/ppl FovWqwb5RtO-KonC0xqPkQ:17897 - transport 1784762788739 23:26:28 19.1s 127.0.0.1 integTest-0
indices:data/read/search FovWqwb5RtO-KonC0xqPkQ:17900 - transport 1784762788753 23:26:28 19.1s 127.0.0.1 integTest-0
indices:data/read/search[phase/query] FovWqwb5RtO-KonC0xqPkQ:17901 FovWqwb5RtO-KonC0xqPkQ:17900 direct 1784762788753 23:26:28 19.1s 127.0.0.1 integTest-0
cluster:monitor/tasks/lists FovWqwb5RtO-KonC0xqPkQ:17957 - transport 1784762807907 23:26:47 249.7micros 127.0.0.1 integTest-0
cluster:monitor/tasks/lists[n] FovWqwb5RtO-KonC0xqPkQ:17958 FovWqwb5RtO-KonC0xqPkQ:17957 direct 1784762807907 23:26:47 138.1micros 127.0.0.1 integTest-0
How can one reproduce the bug?
Steps to reproduce the behavior:
- Run a query with a long table-scan search time, such as
source=logs
| rex field=raw_log "nginx: (?<clientip>\\d+\\.\\d+\\.\\d+\\.\\d+)" max_match=1
| rex field=clientip "^(?<subnet>\\d+\\.\\d+)\\.\\d+\\.\\d+$" max_match=1
| stats count() as requests, sum(is_error) as errors by subnet
| eval error_rate = round(100.0 * errors / requests, 2)
| where error_rate > 10.0
| sort - error_rate
- Cancel it
- Zombie!
This is because our current cancellation checks only happen between DSL pages. This is usually fine because DSL returns fast, but in the case of lots of pathological scripts, this leaves behind long-running search tasks.
What is the expected behavior?
Cancel the underlying search task, which will in turn propagate up to the ppl task automatically.
What is your host/environment?
Mainline
Do you have any screenshots?
N/A
Do you have any additional context?
In #5628, I added polling so cancellation does successfully interrupt the PPL task, but it does not interrupt the underlying search task. (Thankfully the search task is usually not as long as the entire PPL task so the delay is typically only a few seconds. For the majority of queries it's under 200ms, which is why this hasn't been commented on sooner.)
The cancellation does eventually go through after the DSL page returns (which in the worst case will be the timeout time), it's not a failed cancellation from PPL's side, the search task simply is not receiving the notification.
{
"error": {
"code": "UNKNOWN",
"context": {
"stage": "executing",
"stage_description": "Running the query"
},
"details": "java.sql.SQLException: exception while executing query: The task is cancelled.",
"location": [
"while running the query"
],
"reason": "java.sql.SQLException: exception while executing query: The task is cancelled.",
"type": "RuntimeException"
},
"status": 500
}
- Lingua principale
- Java
- Stelle
- 175
- Fork
- 233
- Merge medio
- 2g 16h
- PR unite (30g)
- 39
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opensearch-project/sql
-
[Enhancement] Make the flat_object read depth cap configurable instead of a constantForse già presa @RyanL1997 l’ha presa 13 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
opensearch-project/sql#5842 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"Forse già presa @nagendramohan l’ha presa 76 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
opensearch-project/sql#5684 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[DOC] Calcite settings documentation missing examplesForse già presa @AzazelSensei l’ha presa 33 giorni fa. Apertadocumentation PPL
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opensearch-project/sql#4806 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
opensearch-project/sql#5906 ·
I maintainer di solito rispondono entro 1 giorno
-
bug PPL untriaged
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
opensearch-project/sql#5904 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di opensearch-project/sql
Issue simili
-
pdfium-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Stirling-Tools/JPDFium#188 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openremote/openremote#3487 · 1 commento ·
-
Type/Bug U2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
wso2/product-is#28675 ·
I maintainer di solito rispondono entro 1 giorno
-
a:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
apache/rocketmq-dashboard#7351 ·
I maintainer di solito rispondono entro 3 giorni