Fix wrong banyanDB resource options in record data#13907
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes BanyanDB schema metadata construction for the RECORDS stream-group so the sw_records group is reconciled/created using the intended records (recordsNormal) configuration, not the browser error log configuration. Also updates the changelog to record the fix.
Changes:
- Update
MetadataRegistry.parseMetadatato useconfig.getRecordsNormal()forStreamGroup.RECORDS. - Add a corresponding entry to
docs/en/changes/changes.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/MetadataRegistry.java | Fixes RECORDS stream-group schema metadata to use the correct BanyanDB group resource config (recordsNormal). |
| docs/en/changes/changes.md | Documents the BanyanDB records resource-option fix in the changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
wankai123
approved these changes
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's the problem
In
MetadataRegistry.parseMetadata, theRECORDSstream-group branch builds itsSchemaMetadatafromconfig.getRecordsBrowserErrorLog()instead ofconfig.getRecordsNormal():As a result the
sw_recordsgroup is created/reconciled with therecordsBrowserErrorLogsettings (itsshardNum,segmentInterval,ttl,per-stage
warm/coldconfig) rather than its ownrecordssettings. TheRECORDS_LOGandRECORDS_BROWSER_ERROR_LOGbranches are already correct; onlyRECORDSis affected.Why it matters
BanyanDBIndexInstallerreconciles a group on startup (init mode) by comparingevery field — including per-stage
shardNum/segmentInterval/ttl— andissues
client.updateon drift. Becausesw_recordswas being fed the wrongconfig object, its group settings silently tracked
SW_STORAGE_BANYANDB_BROWSER_ERROR_LOG_*instead ofSW_STORAGE_BANYANDB_RECORDS_*. In deployments where the two differ (e.g. adifferent
shardNum), this can drivesw_recordsto the wrong shard count orsegment-interval grid.
The fix
Point the
RECORDSbranch at the correct config getter:One-line change.
getRecordsNormal()is the existing Lombok getter for therecordsNormalfield, populated from therecordssection ofbydb.yml(
SW_STORAGE_BANYANDB_RECORDS_*).Impact
sw_recordsnow honors its ownrecordsconfiguration.The
RECORDS_LOG/RECORDS_BROWSER_ERROR_LOGgroups are untouched.Segment-interval changes only affect newly created segments; existing segments
keep their grid and no data is rewritten or lost.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.