Copilot commented on code in PR #1055:
URL:
https://github.com/apache/skywalking-banyandb/pull/1055#discussion_r3055786892
##########
banyand/internal/storage/tsdb.go:
##########
@@ -244,6 +245,9 @@ func OpenTSDB[T TSTable, O any](ctx context.Context, opts
TSDBOpts[T, O], cache
return nil, err
}
obsservice.MetricsCollector.Register(location, db.collect)
+ if opts.DisableRotation {
+ return db, nil
+ }
Review Comment:
`OpenTSDB` returns early when `opts.DisableRotation` is true, which skips
`startRotationTask()` entirely. That task currently also drives TTL retention
scheduling, idle segment closing, and index reset for past segments, so this
change effectively disables those behaviors even when `DisableRetention` is
false (e.g., the last lifecycle stage/cold nodes). Consider decoupling “segment
pre-creation” from the rest of `startRotationTask` (e.g., still start the
goroutine/scheduler but gate only the new-segment creation path).
```suggestion
```
--
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]