Skip to content

Commit

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

Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 authored Nov 11, 2024
1 parent 83d2729 commit 61a5b15
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 @@ -169,9 +169,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 @@ -187,13 +189,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 61a5b15

Please sign in to comment.