[BUG] PIT is not deleted when a Calcite query is rejected for memory at start
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start in CalciteEnumerableIndexScan.enumerator(), where osIndex.buildRequest(...) runs as a constructor argument and creates the PIT before OpenSearchIndexEnumerator's constructor performs the memory check and may throw. Read that constructor and its close() method to see why the PIT is never deleted. Done means that a rejected query leaves no open PIT contexts, either because the memory check runs before buildRequest or because the PIT is deleted when the constructor throws, and a test covers that path.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue Summary:
When a query is rejected with Insufficient resources to start query, the PIT it already created is never deleted. It stays open until plugins.sql.cursor.keep_alive (1m) expires.
In CalciteEnumerableIndexScan.enumerator(), osIndex.buildRequest(...) is passed as a constructor argument, so it runs first and creates the PIT. The OpenSearchIndexEnumerator constructor then fails its memory check and throws, so no enumerator exists and close() never runs to delete the PIT.
Steps to Reproduce:
- Index 200k docs into a 2-shard index.
- Bring heap above
plugins.query.memory_limit(default 85%). - Run a full-scan query 20 times, e.g.
source=big | eval z=concat(s, cast(k as string)) | eventstats count() as c by g | sort - z | head 5. - Check
point_in_time_currentin_nodes/stats/indices/search.
###Expected Result:
no open PIT contexts after the queries fail.
Actual Result:
every "start query" rejection leaves 2 open PIT contexts (one per shard) until they expire. Queries rejected mid-scan ("continue processing") don't leak, and neither do successful ones.
Impact:
under memory pressure, rejected queries pile up open PIT contexts toward search.max_open_pit_context (300). New queries can keep failing for up to a minute after memory recovers. Async submits make this easier to hit.
Suggested fix:
check the resource monitor before calling buildRequest, or delete the PIT if the constructor throws.
Env Setup - OpenSearch Version:
3.10.0-SNAPSHOT, main @ 866dafcbd
- 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
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
erupts/erupt#460 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno