From a9a79e9e5229970ca707cf16824717fcc0e69805 Mon Sep 17 00:00:00 2001 From: wayblink Date: Thu, 8 Sep 2022 18:02:30 +0800 Subject: [PATCH] Return shardNum in DescribeCollection (#308) Signed-off-by: wayblink Signed-off-by: wayblink --- client/client_grpc_collection.go | 1 + entity/collection.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/client_grpc_collection.go b/client/client_grpc_collection.go index b2dc02d5..cce3a332 100644 --- a/client/client_grpc_collection.go +++ b/client/client_grpc_collection.go @@ -225,6 +225,7 @@ func (c *grpcClient) DescribeCollection(ctx context.Context, collName string) (* PhysicalChannels: resp.GetPhysicalChannelNames(), VirtualChannels: resp.GetVirtualChannelNames(), ConsistencyLevel: entity.ConsistencyLevel(resp.ConsistencyLevel), + ShardNum: resp.GetShardsNum(), } collection.Name = collection.Schema.CollectionName colInfo := collInfo{ diff --git a/entity/collection.go b/entity/collection.go index bc19476d..7be69f92 100644 --- a/entity/collection.go +++ b/entity/collection.go @@ -21,6 +21,7 @@ type Collection struct { VirtualChannels []string Loaded bool ConsistencyLevel ConsistencyLevel + ShardNum int32 } // Partition represent partition meta in Milvus