[Bug] BanyanDB trace block metadata format changed in 0.11 without a file format version bump
メンテナーはふだん 1 日以内に返信
@hanahmily がすでに取り組んでいます。
2026年10月26日 から。
評価
この issue はまだ評価されていません。
説明
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
BanyanDB (apache/skywalking-banyandb)
What happened
apache/skywalking-banyandb#1237 changed the on-disk encoding of trace blockMetadata. It inserts a timestamp-bounds marker and the min/max timestamps between count and spans (marshal, unmarshal, skip). The readers accept only the new layout.
The file format version was not bumped. It is still 1.5.0, the same as in 0.10.3, and versions.yml still lists 1.4.0 and 1.5.0 (also on main, now in pkg/fileformat). Earlier on-disk format changes did bump it, for example apache/skywalking-banyandb#665 (1.2.0 → 1.3.0), apache/skywalking-banyandb#925 (1.3.0 → 1.4.0) and apache/skywalking-banyandb#1051 (1.4.0 → 1.5.0).
Because of this, the compatibility check described in docs/operation/upgrade.md passes when 0.11 opens trace data written by 0.10. The server starts normally, and the incompatibility only appears at query time. Every trace query whose time range touches a 0.10 part fails as a whole:
execute the query plan for trace segment: cannot iterate tstIter: cannot read primary block for part
"Oct 25 00:00:00, Oct 25 04:33:26, 21 MB, 67 MB, 17,008, 11,784" at offset 73553 with size 24852:
cannot unmarshal index block: cannot skip blockMetadata entry: cannot skip timestamp bounds marker: 4447272
The reader takes the old spans.offset for the new marker and rejects any value greater than 1.
In the same upgrade, measure, stream and property data written by 0.10.3 were read correctly by 0.11.1. OAP 11.0.0 returned the same results as OAP 10.4.0 on 0.10.3. Only trace data is affected. Neither the 0.11.0 CHANGES nor the "Upgrading to 0.11" section of the upgrade guide mentions a trace data format change.
What you expected to happen
A change to the on-disk format should come with a file format version bump, as earlier releases did. The incompatibility is then detected and handled explicitly, instead of every trace query failing after a successful start.
Ideally, 0.11 should also keep reading trace data written by 0.10. Otherwise users who upgrade have to drop up to a full TTL of traces. The new layout already supports blocks whose timestamp bounds are unknown, so old blocks could be read that way.
Data that 0.11.0 and 0.11.1 have already written also carries version 1.5.0 but uses the new layout. A bump in the next release therefore cannot rely on 1.5.0 alone to identify the old layout.
How to reproduce
- Run BanyanDB 0.10.3 in standalone mode with OAP 10.4.0, and let an agent report some traces.
- Stop OAP and BanyanDB. On the same data directory, start BanyanDB 0.11.1 and OAP 11.0.0.
- BanyanDB starts without any version error.
- Query traces over a time range that includes the data written by 0.10.3, for example
queryTraceswithqueryOrder: BY_DURATION. The query fails with the error above.
Anything else
Environment: standalone mode, arm64 (AWS t4g), Docker images apache/skywalking-banyandb:0.10.3 → 0.11.1 and apache/skywalking-oap-server:10.4.0 → 11.0.0. Schema registry is property-based (no etcd). Segment metadata on disk before the upgrade is {"version":"1.5.0","endTime":...}.
I'm glad to help with a fix once the preferred direction is clear.
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
- 平均マージ
- 16時間 55分
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/skywalking のほかの issue
-
[BanyanDB] Flaky test: TestExportRelay_TwoRelaysShareOneRate対応中かも @hanahmily が今日担当しました。 オープンdatabase test
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
apache/skywalking#14175 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Trace profiling segment list becomes empty after the task finishes, while still inside the query window対応中かも @hanahmily が 2 日前に担当しました。 オープンbug database
apache/skywalking#14172 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
chore CLI database
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
apache/skywalking#14168 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] BanyanDB stream scans run out of query memory even with a small limit対応中かも @hanahmily が 6 日前に担当しました。 オープンbug database
apache/skywalking#14165 · コメント 3 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
[Feature] Canopy auth 2/2: SSO (OIDC/OAuth2), break-glass and the auth design doc対応中かも @hanahmily が 4 日前に担当しました。 オープンdatabase feature
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
apache/skywalking#14162 ·
メンテナーはふだん 1 日以内に返信
apache/skywalking の issue をすべて見る
似ている issue
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信
-
priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/java-genai#1372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
carlos-emr/carlos#5431 ·
メンテナーはふだん 1 日以内に返信