Copilot commented on code in PR #1117:
URL: 
https://github.com/apache/skywalking-banyandb/pull/1117#discussion_r3199375785


##########
banyand/metadata/schema/collector.go:
##########
@@ -99,6 +99,13 @@ func (icr *InfoCollectorRegistry) CollectDataInfo(ctx 
context.Context, group str
        if getErr != nil {
                return nil, nil, getErr
        }
+       // PROPERTY groups are key-value metadata: no DataInfoCollector is
+       // registered for them and no Topic*CollectDataInfo broadcast applies.
+       // Skip the entire pipeline so the inspector reports nothing instead
+       // of falling into the unsupported-catalog default branch.
+       if g.Catalog == commonv1.Catalog_CATALOG_PROPERTY {
+               return nil, nil, nil

Review Comment:
   The new PROPERTY short-circuit returns nil slices on success. Elsewhere in 
this file, successful “no results” cases return empty (non-nil) slices (e.g., 
localInfoList initialized to an empty slice; broadcast helpers return empty 
slices on failure), which keeps Inspect responses consistent and avoids 
nil-vs-empty differences in proto/JSON output. Consider returning empty slices 
(and an empty errors slice) here as well.
   



##########
banyand/metadata/schema/collector.go:
##########
@@ -173,6 +180,13 @@ func (icr *InfoCollectorRegistry) CollectLiaisonInfo(ctx 
context.Context, group
        if getErr != nil {
                return nil, getErr
        }
+       // PROPERTY groups are key-value metadata: no LiaisonInfoCollector is
+       // registered for them and no Topic*CollectLiaisonInfo broadcast 
applies.
+       // Skip the entire pipeline so the inspector reports nothing instead of
+       // falling into the unsupported-catalog default branch.
+       if g.Catalog == commonv1.Catalog_CATALOG_PROPERTY {
+               return nil, nil

Review Comment:
   For PROPERTY groups, this returns a nil slice on success. For other 
catalogs, CollectLiaisonInfo returns an empty (non-nil) slice when there’s 
simply nothing to report (localInfoList := []*LiaisonInfo{}). To keep response 
shape consistent (and avoid nil-vs-empty differences when marshaling), consider 
returning an empty slice here too.
   



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