Skip to content

Commit a02d03b

Browse files
rescrvgithub-actions[bot]
authored andcommitted
[BUG] Panic on sysdb when calling CheckCollection (#4899)
## Description of changes PR #4722 introduced a new field to the CheckCollectionsResponse, but does not populate the slice/array necessary to return the result, ending up in a null-ptr deref. This PR populates the array at top of the loop. ## Test plan CI + review ## Documentation Changes N/A
1 parent 5d0c4ad commit a02d03b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

go/pkg/sysdb/grpc/collection_service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ func (s *Server) GetCollectionSize(ctx context.Context, req *coordinatorpb.GetCo
263263
func (s *Server) CheckCollections(ctx context.Context, req *coordinatorpb.CheckCollectionsRequest) (*coordinatorpb.CheckCollectionsResponse, error) {
264264
res := &coordinatorpb.CheckCollectionsResponse{}
265265
res.Deleted = make([]bool, len(req.CollectionIds))
266+
res.LogPosition = make([]int64, len(req.CollectionIds))
266267

267268
for i, collectionID := range req.CollectionIds {
268269
parsedId, err := types.ToUniqueID(&collectionID)

0 commit comments

Comments
 (0)