Remove partition and segment ids properly in query node (#5090)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>

**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
pull/5092/head
bigsheeper 2021-04-29 15:59:08 +08:00 committed by GitHub
parent 7a188a8ae5
commit 88e1d651cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}

View File

@ -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)
}
}