[BUG] MissingRequiredPropertyException: Missing required property 'ResourceStats.average' when polling _tasks API
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
spec/schemas/_common.yaml から始め、ResourceStats の要件を、ここに示されている OpenSearch 1.3 の _tasks レスポンスと比較してください。仕様を変更する前に互換性マトリックスを確認し、その後、resource_stats.total のみを含む処理中のレスポンスを処理できること、および既存のクライアントテストが成功することを検証してください。
索引モデルが issue の本文から書いたものです。
説明
What is the bug?
The ResourceStats schema in spec/schemas/_common.yaml of the opensearch-api-specification marks average, max, min, thread_info, and total as all required. However, the _tasks API on OpenSearch 1.3 only returns total in the resource_stats block when a task is in-flight.
Per the compatibility matrix, opensearch-java 3.x supports OpenSearch 1.x-3.x, so the spec should reflect what 1.x actually returns.
This causes the opensearch-java 3.8.0 client to throw:
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'ResourceStats.average'
at org.opensearch.client.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:90)
at org.opensearch.client.opensearch._types.ResourceStats.<init>(ResourceStats.java:82)
at org.opensearch.client.opensearch._types.ResourceStats$Builder.build(ResourceStats.java:302)
at org.opensearch.client.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:92)
How can one reproduce the bug?
1. Index test documents (100k+):
POST /test-index/_bulk
{"index":{"_id":"1"}}
{"date":"2020-01-01T00:00:00Z","status":"OPEN"}
{"index":{"_id":"2"}}
{"date":"2020-01-01T00:00:00Z","status":"OPEN"}
... (repeat to 100k+ documents)
2. Submit async delete-by-query:
POST /test-index/_delete_by_query?wait_for_completion=false&conflicts=proceed
{
"query": {
"range": {
"date": {
"lt": "now-6M/d"
}
}
}
}
Response:
{
"task": "nodeId:1234567"
}
3. Poll the task while it's still running:
GET /_tasks/nodeId:1234567
In-flight response (before task completes):
{
"completed": false,
"task": {
"node": "nodeId",
"id": 1234567,
"type": "transport",
"action": "indices:data/write/delete/byquery",
"status": {
"total": 100000,
"updated": 0,
"created": 0,
"deleted": 11000,
"batches": 12,
"version_conflicts": 0,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1.0,
"throttled_until_millis": 0
},
"description": "delete-by-query [test-index]",
"start_time_in_millis": 1781528541973,
"running_time_in_nanos": 587603829,
"cancellable": true,
"cancelled": false,
"headers": {},
"resource_stats": {
"total": {
"cpu_time_in_nanos": 0,
"memory_in_bytes": 0
}
}
}
}
Note: resource_stats contains only total. The fields average, max, min, and thread_info are absent. The opensearch-java 3.8.0 client fails to deserialize this response because ResourceStats marks all five fields as required.
4. After task completes, resource_stats is no longer present in the response, which is why this only surfaces when polling in-flight tasks with large enough data volumes for the task to take seconds.
Environment
- opensearch-java client version: 3.8.0
- OpenSearch server: 1.3
- Java version: 17
- 主要言語
- Java
- スター
- 165
- フォーク
- 257
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 44
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opensearch-project/opensearch-java のほかの issue
-
enhancement untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
opensearch-project/opensearch-java#2188 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] "shape" should not be required in GeoShapeQueryField再び着手できるかも @lsh1215 が 121 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
opensearch-project/opensearch-java#2011 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] ISM types lastUpdatedTime is susceptible to int overflow対応中かも @gingeekrishna が 117 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
opensearch-project/opensearch-java#1898 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug untriaged
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
opensearch-project/opensearch-java#2248 ·
メンテナーはふだん 1 日以内に返信
-
[FEATURE] `BulkIngester`: avoid double serialization of `update` operations and keep them in binary form対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement untriaged
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
opensearch-project/opensearch-java#2195 ·
メンテナーはふだん 1 日以内に返信
opensearch-project/opensearch-java の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 2 日以内に返信
-
code-health feature/sync OS/Android QA/Test-Plan-Specified QA/Yes
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
brave/brave-browser#60327 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws/context-ontology-accelerator#325 ·
メンテナーはふだん 1 日以内に返信
-
The README tells to run `mvn jeo:disassemble`, which fails with `No plugin found for prefix 'jeo'`オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
objectionary/jeo-maven-plugin#1938 ·
メンテナーはふだん 2 日以内に返信
-
effort/l priority/p2 risk/high triage/deferred
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
iflytek/skillhub#1039 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信