hanahmily commented on code in PR #848:
URL: 
https://github.com/apache/skywalking-banyandb/pull/848#discussion_r2532731502


##########
banyand/internal/storage/visitor.go:
##########
@@ -25,38 +25,48 @@ import (
        "github.com/pkg/errors"
 
        "github.com/apache/skywalking-banyandb/api/common"
+       "github.com/apache/skywalking-banyandb/pkg/logger"
        "github.com/apache/skywalking-banyandb/pkg/timestamp"
 )
 
+var log = logger.GetLogger("storage", "visitor")
+
 // SegmentVisitor defines the interface for visiting segment components.
 type SegmentVisitor interface {
        // VisitSeries visits the series index directory for a segment.
-       VisitSeries(segmentTR *timestamp.TimeRange, seriesIndexPath string, 
shardIDs []common.ShardID) error
+       VisitSeries(segmentTR *timestamp.TimeRange, segmentSuffix, 
seriesIndexPath string, shardIDs []common.ShardID) error

Review Comment:
   ```suggestion
        VisitSeries(segmentTR *timestamp.TimeRange, seriesIndexPath string, 
shardIDs []common.ShardID) error
   ```
   
   The suffix is from an external source; no internal references are located.



##########
api/proto/banyandb/measure/v1/rpc.proto:
##########
@@ -32,7 +32,9 @@ option 
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {base_pat
 
 message DeleteExpiredSegmentsRequest {
   string group = 1;
+  // Departed: using segment_time_range instead.
   model.v1.TimeRange time_range = 2;

Review Comment:
   Is `time_range` obsolete?



##########
banyand/internal/storage/visitor.go:
##########
@@ -25,38 +25,48 @@ import (
        "github.com/pkg/errors"
 
        "github.com/apache/skywalking-banyandb/api/common"
+       "github.com/apache/skywalking-banyandb/pkg/logger"
        "github.com/apache/skywalking-banyandb/pkg/timestamp"
 )
 
+var log = logger.GetLogger("storage", "visitor")
+
 // SegmentVisitor defines the interface for visiting segment components.
 type SegmentVisitor interface {
        // VisitSeries visits the series index directory for a segment.
-       VisitSeries(segmentTR *timestamp.TimeRange, seriesIndexPath string, 
shardIDs []common.ShardID) error
+       VisitSeries(segmentTR *timestamp.TimeRange, segmentSuffix, 
seriesIndexPath string, shardIDs []common.ShardID) error

Review Comment:
   To access segments, use `storage.VisitSegmentsInTimeRange`. Store the 
accessed segment suffixes in `SegmentVisitor`.`



-- 
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]

Reply via email to