From 49b6c3101d3d8b3db82035f9eb96c03593f0a201 Mon Sep 17 00:00:00 2001 From: sunby Date: Thu, 9 Sep 2021 19:08:03 +0800 Subject: [PATCH] Remove datacoord useless code (#7673) Issue: #7624 Signed-off-by: sunby --- internal/datacoord/meta_test.go | 1 - internal/datacoord/segment_allocation_policy.go | 2 -- internal/datacoord/server.go | 7 +------ internal/datacoord/server_test.go | 1 - 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/internal/datacoord/meta_test.go b/internal/datacoord/meta_test.go index 73e481b38..d1e2d97b4 100644 --- a/internal/datacoord/meta_test.go +++ b/internal/datacoord/meta_test.go @@ -147,7 +147,6 @@ func TestMeta_Basic(t *testing.T) { t.Run("Test GetCount", func(t *testing.T) { const rowCount0 = 100 const rowCount1 = 300 - const dim = 1024 // no segment nums := meta.GetNumRowsOfCollection(collID) diff --git a/internal/datacoord/segment_allocation_policy.go b/internal/datacoord/segment_allocation_policy.go index 7a48587ac..8eb7d1da7 100644 --- a/internal/datacoord/segment_allocation_policy.go +++ b/internal/datacoord/segment_allocation_policy.go @@ -79,8 +79,6 @@ func AllocatePolicyV1(segments []*SegmentInfo, count int64, return newSegmentAllocations, existedSegmentAllocations } -type sealPolicy func(maxCount, writtenCount, allocatedCount int64) bool - // segmentSealPolicy seal policy applies to segment type segmentSealPolicy func(segment *SegmentInfo, ts Timestamp) bool diff --git a/internal/datacoord/server.go b/internal/datacoord/server.go index 223b8fb59..40d1909ec 100644 --- a/internal/datacoord/server.go +++ b/internal/datacoord/server.go @@ -41,11 +41,7 @@ import ( "github.com/milvus-io/milvus/internal/proto/milvuspb" ) -const ( - rootCoordClientTimout = 20 * time.Second - connEtcdMaxRetryTime = 100000 - connEtcdRetryInterval = 200 * time.Millisecond -) +const connEtcdMaxRetryTime = 100000 var ( // TODO: sunby put to config @@ -95,7 +91,6 @@ type Server struct { allocator allocator cluster *Cluster rootCoordClient types.RootCoord - ddChannelName string metricsCacheManager *metricsinfo.MetricsCacheManager diff --git a/internal/datacoord/server_test.go b/internal/datacoord/server_test.go index fa5b4bba9..b9a60f903 100644 --- a/internal/datacoord/server_test.go +++ b/internal/datacoord/server_test.go @@ -61,7 +61,6 @@ func TestAssignSegmentID(t *testing.T) { const collIDInvalid = 101 const partID = 0 const channel0 = "channel0" - const channel1 = "channel1" t.Run("assign segment normally", func(t *testing.T) { svr := newTestServer(t, nil) -- GitLab