Skip to content

Commit

Permalink
fix: fix miss makezero bug
Browse files Browse the repository at this point in the history
Signed-off-by: alingse <alingse@foxmail.com>
  • Loading branch information
alingse committed May 26, 2024
1 parent 36cbce4 commit 88f3ff0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/tools/migration/meta/210_to_220.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func getLatestFieldIndexes(colls map[Timestamp]*pb.CollectionInfo) *FieldIndexes
coll *pb.CollectionInfo
}
l := len(colls)
pairs := make([]pair, l)
pairs := make([]pair, 0, l)
for ts, coll := range colls {
pairs = append(pairs, pair{ts: ts, coll: coll})
}
Expand Down
2 changes: 1 addition & 1 deletion internal/rootcoord/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (b *ServerBroker) BroadcastAlteredCollection(ctx context.Context, req *milv
return err
}

partitionIDs := make([]int64, len(colMeta.Partitions))
partitionIDs := make([]int64, 0, len(colMeta.Partitions))
for _, p := range colMeta.Partitions {
partitionIDs = append(partitionIDs, p.PartitionID)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/minicluster_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func StartMiniClusterV2(ctx context.Context, opts ...OptionV2) (*MiniClusterV2,
}

func (cluster *MiniClusterV2) AddQueryNodes(k int) []*grpcquerynode.Server {
servers := make([]*grpcquerynode.Server, k)
servers := make([]*grpcquerynode.Server, 0, k)
for i := 0; i < k; i++ {
servers = append(servers, cluster.AddQueryNode())
}
Expand Down

0 comments on commit 88f3ff0

Please sign in to comment.