From 88e1d651cbdb37bc963bb131903180d1cece2c6b Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Thu, 29 Apr 2021 15:59:08 +0800 Subject: [PATCH] Remove partition and segment ids properly in query node (#5090) Signed-off-by: bigsheeper **What type of PR is this?** - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring **Which issue(s) this PR fixes:** Fixes # **What this PR does / why we need it:** Not Available --- internal/querynode/collection.go | 2 +- internal/querynode/partition.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/querynode/collection.go b/internal/querynode/collection.go index 639b961545..2f2fa6e32a 100644 --- a/internal/querynode/collection.go +++ b/internal/querynode/collection.go @@ -52,7 +52,7 @@ func (c *Collection) addPartitionID(partitionID UniqueID) { func (c *Collection) removePartitionID(partitionID UniqueID) { tmpIDs := make([]UniqueID, 0) for _, id := range c.partitionIDs { - if id == partitionID { + if id != partitionID { tmpIDs = append(tmpIDs, id) } } diff --git a/internal/querynode/partition.go b/internal/querynode/partition.go index cfb6003a1a..95f6cc6c38 100644 --- a/internal/querynode/partition.go +++ b/internal/querynode/partition.go @@ -46,7 +46,7 @@ func (p *Partition) addSegmentID(segmentID UniqueID) { func (p *Partition) removeSegmentID(segmentID UniqueID) { tmpIDs := make([]UniqueID, 0) for _, id := range p.segmentIDs { - if id == segmentID { + if id != segmentID { tmpIDs = append(tmpIDs, id) } }