[Bug] [BanyanDB] timestamp.ParseDuration silently drops everything after "d"
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
まず、レポートに記載されている pkg/timestamp.ParseDuration を読み、既存のテストを確認してください。"1d12h" で問題を再現し、パース時に日数と残りの期間が合算されるか、入力が無効な場合にエラーが返されることを確認してください。報告されたケースが正しく動作し、テストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
BanyanDB (apache/skywalking-banyandb)
What happened
pkg/timestamp.ParseDuration only reads the number before the first "d" and ignores the rest.
"1d12h"-> 24h, no error"2d30m"-> 48h, no error"1day"-> 24h, no error"1.5d"-> error
It's used for measure intervals and BydbQL TIME_BUCKET('...') widths, so TIME_BUCKET('1d12h') groups into 24h buckets without any error.
What you expected to happen
"1d12h" should be 36h, or at least return an error instead of a wrong value.
How to reproduce
d, err := timestamp.ParseDuration("1d12h")
fmt.Println(d, err) // 24h0m0s <nil>
Anything else
Fix could be: parse the day part, then pass the rest to time.ParseDuration and add them. Happy to send a PR with tests.
Are you willing to submit a pull request to fix on your own?
- Yes I am willing to submit a pull request on my own!
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要言語
- Java
- スター
- 25k
- フォーク
- 6.6k
- 平均マージ
- 10時間 45分
- マージ済み PR(30日)
- 49
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/skywalking のほかの issue
-
[BanyanDB] Let trace queries exclude the raw span from results対応中かも @hanahmily が今日担当しました。 オープンenhancement
apache/skywalking#14288 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[BanyanDB] Data race and nil-pointer panic: measure write during standalone shutdown after segment close対応中かも @hanahmily が今日担当しました。 オープンbug
apache/skywalking#14285 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
apache/skywalking#14283 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BanyanDB] Store trace binary tags only in core storage, not in secondary index (sidx)対応中かも @hanahmily が今日担当しました。 オープンenhancement
apache/skywalking#14282 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] BanyanDB stream query on a hot entity scans all its rows despite a small limit対応中かも @hanahmily が 8 日前に担当しました。 オープンbug
apache/skywalking#14261 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
apache/skywalking の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testng-team/testng#3672 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
eclipse-edc/IdentityHub#1296 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
cloudfoundry/uaa#4194 ·
メンテナーはふだん 1 日以内に返信
-
area: ui priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
tetsuji16/microProject#1721 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信