This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 2c9946197 Lifecycle only handle stream/measure/trace snapshots (#1202)
2c9946197 is described below
commit 2c9946197a9df91dd02cffdeb880aa00a12f837d
Author: mrproliu <[email protected]>
AuthorDate: Fri Jul 3 09:12:15 2026 +0800
Lifecycle only handle stream/measure/trace snapshots (#1202)
---
CHANGES.md | 1 +
banyand/backup/lifecycle/steps.go | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/CHANGES.md b/CHANGES.md
index 60bb76767..bcaee768d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -126,6 +126,7 @@ Release Notes.
- Consolidate lifecycle migration report errors into a single flat list of
structured, stage-aware entries.
- Fix backup container OOM from overlapping scheduled runs; serialize runs and
upload small snapshot files concurrently.
- Fix block metadata reset before unmarshal for stream and trace.
+- Lifecycle only handles stream/measure/trace snapshots, skipping other
catalogs.
### Document
diff --git a/banyand/backup/lifecycle/steps.go
b/banyand/backup/lifecycle/steps.go
index 72d4d5b30..0c3f1d9a3 100644
--- a/banyand/backup/lifecycle/steps.go
+++ b/banyand/backup/lifecycle/steps.go
@@ -60,6 +60,15 @@ func (l *lifecycleService) getSnapshots(ctx context.Context,
groups []*commonv1.
return "", "", "", err
}
for _, snp := range snn {
+ // A data node broadcasts the snapshot request to every catalog
listener it runs, so the
+ // response also carries property and schema-property
snapshots. The lifecycle only migrates
+ // stream/measure/trace and has no property/schema root
configured, so skip the rest to avoid
+ // resolving them against an empty root (which fails os.Stat
and logs a spurious error).
+ switch snp.Catalog {
+ case commonv1.Catalog_CATALOG_STREAM,
commonv1.Catalog_CATALOG_MEASURE, commonv1.Catalog_CATALOG_TRACE:
+ default:
+ continue
+ }
snapshotDir, errDir := snapshot.Dir(snp, l.streamRoot,
l.measureRoot, "", l.traceRoot, "")
if errDir != nil {
l.l.Error().Err(errDir).Msgf("Failed to get snapshot
directory for %s", snp.Name)