[Bug] BanyanDB trace block metadata format changed in 0.11 without a file format version bump
Los mantenedores suelen responder en 1 día
@hanahmily ya está trabajando en esto.
Desde el 26/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 25k
- Forks
- 6.6k
- Merge medio
- 15 h 37 min
- PR fusionados (30 d)
- 32
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/skywalking
-
chore CLI database
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
apache/skywalking#14168 ·
Los mantenedores suelen responder en 1 día
-
[Bug] BanyanDB stream scans run out of query memory even with a small limitPosiblemente ocupada @hanahmily la tomó hace 3 días. Abiertobug database
apache/skywalking#14165 · 3 comentarios · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
[Feature] Canopy auth 2/2: SSO (OIDC/OAuth2), break-glass and the auth design docPosiblemente ocupada @hanahmily la tomó hace 2 días. Abiertodatabase feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
apache/skywalking#14162 ·
Los mantenedores suelen responder en 1 día
-
[Feature] Canopy auth 1/2: local auth — auth config, argon2id login, server-side sessions, API tokensPosiblemente ocupada @hanahmily la tomó hace 3 días. Abiertodatabase feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
apache/skywalking#14159 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
apache/skywalking#14158 ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/skywalking
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Type/Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ballerina-platform/static-code-analysis-tool#140 ·
Los mantenedores suelen responder en 1 día
-
ready-for-triage triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
RedHatInsights/notifications-backend#5080 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
protobuf
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FasterXML/jackson-dataformats-binary#874 ·
Los mantenedores suelen responder en 1 día