[BUG] Field mapped in only some indices fails shards with opaque "Failed to get value for parameter ?N"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
調査の方向性
Start by reading CalciteScriptEngine.ScriptDataContext.get and getFromDocValue, then trace how unmapped fields are handled by the document provider. Add coverage for a field mapped in one index but absent from another, including the two-index pattern in the report. Done means both documents are counted, the absent field evaluates to null, and shard failures retain a useful cause.
索引モデルが issue の本文から書いたものです。
説明
What is the bug?
When a pushed-down script reads a field that one index in the pattern doesn't map, that index's shard fails with Failed to get value for parameter ?0 instead of reading the field as null, and aggregates come back wrong.
How can one reproduce the bug?
Steps to reproduce the behavior:
- Create two indices. Only the first maps
rt.
curl -s -X PUT localhost:9200/mixdemo_a -H 'Content-Type: application/json' \
-d '{"mappings":{"properties":{"rt":{"type":"keyword"}}}}' | jq .acknowledged
curl -s -X PUT localhost:9200/mixdemo_b -H 'Content-Type: application/json' \
-d '{"mappings":{"properties":{"other":{"type":"long"}}}}' | jq .acknowledged
- Index one doc into each.
curl -s -X POST 'localhost:9200/mixdemo_a/_doc?refresh=true' -H 'Content-Type: application/json' -d '{"rt":"12.5"}' | jq .result
curl -s -X POST 'localhost:9200/mixdemo_b/_doc?refresh=true' -H 'Content-Type: application/json' -d '{"other":1}' | jq .result
- Count docs while casting
rt. The count is 1, not 2, and themixdemo_bshard fails.
curl -s -X POST localhost:9200/_plugins/_ppl -H 'Content-Type: application/json' \
-d '{"query":"source=mixdemo_* | eval t = cast(rt as double) | stats count() as n, max(t) as mx"}' \
| jq -c '{datarows, warnings}'
# {"datarows":[[1,12.5]],"warnings":[{"type":"PARTIAL_RESULT","message":"Results are partial: 1 of 2 shards failed.",
# "detail":"_shards: total 2, successful 1, skipped 0, failed 1; failures: [[mixdemo_b][0] IllegalStateException: Failed to get value for parameter ?0]"}]}
What is the expected behavior?
n is 2 and there's no shard failure: rt reads as null on mixdemo_b, the same as a doc that lacks the field. When a shard does fail, the message should say why.
What is your host/environment?
- mainline (3.10.0-SNAPSHOT), single node
Do you have any screenshots?
N/A
Do you have any additional context?
CalciteScriptEngine.ScriptDataContext.getcatches every exception and rethrowsIllegalStateException("Failed to get value for parameter " + name)without the cause, so neither the response nor the node log says what went wrong. Nothing was logged in this repro.- The likely cause (from code, since the original exception is swallowed): core
LeafDocLookup.getthrowsNo field found for [rt] in mappingfor unmapped fields, andgetFromDocValueonly handlesdocValue == null. - Possible fix: keep the cause and name the field in the message; return null when
!docProvider.containsKey(name); add a unit test and an IT using this two-index pattern. - Seen at thousands of shard failures per day on a large index pattern, mostly from casts inside aggregations.
- Related: #5825 and #5835 (mixed mappings across a pattern give opaque 500s), #4508 and #4461 (earlier
ScriptDataContext.getbugs).
- 主要言語
- Java
- スター
- 176
- フォーク
- 237
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opensearch-project/sql のほかの issue
-
bug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
opensearch-project/sql#5990 ·
メンテナーはふだん 1 日以内に返信
-
bug untriaged
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
opensearch-project/sql#5983 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] PromQL queries fail with InvalidTypeIdException when metric has a label named "type"対応中かも @nagendramohan が 107 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
opensearch-project/sql#5684 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[DOC] Calcite settings documentation missing examples対応中かも @AzazelSensei が 64 日前に担当しました。 オープンdocumentation PPL
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
opensearch-project/sql#4806 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
calcite enhancement Meta performance PPL untriaged
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
opensearch-project/sql#5991 ·
メンテナーはふだん 1 日以内に返信
opensearch-project/sql の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
PCL-Community/PCL-CE#3907 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 2 日以内に返信
-
area/dependencies area/dependencies/quarkus backport/26.6 backport/26.8 kind/cve severity/critical source/scan-dependencies status/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
docker-to-squash.py: check_dependencies should find mksquashfs on PATH対応中かも @linzch3 が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
chore
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
lugassawan/swe-workbench#841 ·