Skip to content

Commit

Permalink
fix: Lost loading collection's updateTs after qc restart (#37538) (#3…
Browse files Browse the repository at this point in the history
…7580)

issue: #37537
pr: #37538

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 authored Nov 11, 2024
1 parent 9e8b6ac commit 25c9699
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions internal/querycoordv2/meta/collection_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,11 @@ func (m *CollectionManager) Recover(broker Broker) error {
}
}

m.collections[collection.CollectionID] = &Collection{
// update collection's CreateAt and UpdateAt to now after qc restart
m.putCollection(false, &Collection{
CollectionLoadInfo: collection,
}
CreatedAt: time.Now(),
})
}

for collection, partitions := range partitions {
Expand All @@ -200,13 +202,19 @@ func (m *CollectionManager) Recover(broker Broker) error {
}

partition.RecoverTimes += 1
m.putPartition([]*Partition{{PartitionLoadInfo: partition}}, true)
m.putPartition([]*Partition{
{
PartitionLoadInfo: partition,
CreatedAt: time.Now(),
},
}, true)
continue
}

m.putPartition([]*Partition{
{
PartitionLoadInfo: partition,
CreatedAt: time.Now(),
},
}, false)
}
Expand Down

0 comments on commit 25c9699

Please sign in to comment.