mrproliu opened a new pull request, #13907:
URL: https://github.com/apache/skywalking/pull/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.
- [ ] If this pull request closes/resolves/fixes an existing issue, replace
the issue number. Closes #<issue number>.
- [x] Update the [`CHANGES`
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]