This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new b4bc7ea8db Fix wrong banyanDB resource options in record data (#13907)
b4bc7ea8db is described below

commit b4bc7ea8dbfbea9b5acb501f07f88b47861f7c47
Author: mrproliu <[email protected]>
AuthorDate: Sat Jun 13 12:41:10 2026 +0800

    Fix wrong banyanDB resource options in record data (#13907)
    
    #### What's the problem
    
    In `MetadataRegistry.parseMetadata`, the `RECORDS` stream-group branch 
builds its
    `SchemaMetadata` from `config.getRecordsBrowserErrorLog()` instead of
    `config.getRecordsNormal()`:
    
    ```java
    case RECORDS:
        return new SchemaMetadata(
            namespace,
            BanyanDB.StreamGroup.RECORDS.getName(),   // group = sw_records
            model.getName(),
            Kind.STREAM,
            model.getDownsampling(),
            config.getRecordsBrowserErrorLog()         // <-- wrong: should be 
recordsNormal
        );
    ```
    
    As a result the `sw_records` group is created/reconciled with the
    `recordsBrowserErrorLog` settings (its `shardNum`, `segmentInterval`, `ttl`,
    per-stage `warm`/`cold` config) rather than its own `records` settings. The
    `RECORDS_LOG` and `RECORDS_BROWSER_ERROR_LOG` branches are already correct; 
only
    `RECORDS` is affected.
    
    #### Why it matters
    
    `BanyanDBIndexInstaller` reconciles a group on startup (init mode) by 
comparing
    every field — including per-stage `shardNum` / `segmentInterval` / `ttl` — 
and
    issues `client.update` on drift. Because `sw_records` was being fed the 
wrong
    config object, its group settings silently tracked
    `SW_STORAGE_BANYANDB_BROWSER_ERROR_LOG_*` instead of
    `SW_STORAGE_BANYANDB_RECORDS_*`. In deployments where the two differ (e.g. a
    different `shardNum`), this can drive `sw_records` to the wrong shard count 
or
    segment-interval grid.
    
    #### The fix
    
    Point the `RECORDS` branch at the correct config getter:
    
    ```java
    config.getRecordsNormal()
    ```
    
    One-line change. `getRecordsNormal()` is the existing Lombok getter for the
    `recordsNormal` field, populated from the `records` section of `bydb.yml`
    (`SW_STORAGE_BANYANDB_RECORDS_*`).
    
    #### Impact
    
    - `sw_records` now honors its own `records` configuration.
    - The `RECORDS_LOG` / `RECORDS_BROWSER_ERROR_LOG` groups are untouched.
    - Segment-interval changes only affect newly created segments; existing 
segments
      keep their grid and no data is rewritten or lost.
---
 docs/en/changes/changes.md                                              | 1 +
 .../skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index 53c1e3850e..bffa0e8405 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -294,6 +294,7 @@
 * Mask keywords `trustStorePass`, `keyStorePass` by default.
 * Bump up dependencies to clear CVE alerts on shipped OAP jars: log4j `2.25.3` 
→ `2.25.4`, jackson `2.18.5` → `2.18.6`, kafka-clients `3.4.0` → `3.9.2`, 
postgresql `42.4.4` → `42.7.11`, commons-compress `1.21` → `1.26.2`.
 * Fix: continuous profiling policy validation now rejects a threshold / count 
of `0` to match the error messages and rover's `value >= threshold` trigger 
semantics (a `0` threshold would always trigger). CPU percent and HTTP error 
rate are tightened from `[0-100]` to `(0-100]`.
+* Fix wrong BanyanDB resource options in record data.
 
 #### UI
 * Add Airflow layer dashboards and menu i18n under Workflow Scheduler in 
Horizon UI (SWIP-7).
diff --git 
a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java
 
b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java
index 09e4affc5a..958b4c6151 100644
--- 
a/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java
+++ 
b/oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java
@@ -721,7 +721,7 @@ public enum MetadataRegistry {
                             model.getName(),
                             Kind.STREAM,
                             model.getDownsampling(),
-                            config.getRecordsBrowserErrorLog()
+                            config.getRecordsNormal()
                         );
                     default:
                         throw new IllegalStateException("unknown stream group 
" + streamGroup);

Reply via email to