mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix: Clear channelcp meta and metrics ASAP (#35658)
See also: #35588 --------- Signed-off-by: yangxuan <xuan.yang@zilliz.com>
This commit is contained in:
parent
f756f01445
commit
82743c5c50
@ -510,9 +510,12 @@ func (gc *garbageCollector) recycleChannelCPMeta(ctx context.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
if err := gc.meta.DropChannelCheckpoint(vChannel); err != nil {
|
||||
err := gc.meta.DropChannelCheckpoint(vChannel)
|
||||
if err != nil {
|
||||
// Try to GC in the next gc cycle if drop channel cp meta fail.
|
||||
log.Warn("failed to drop channel check point during gc", zap.String("vchannel", vChannel), zap.Error(err))
|
||||
log.Warn("failed to drop channelcp check point during gc", zap.String("vchannel", vChannel), zap.Error(err))
|
||||
} else {
|
||||
log.Info("GC channel cp", zap.String("vchannel", vChannel))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,12 @@ func (h *ServerHandler) FinishDropChannel(channel string, collectionID int64) er
|
||||
log.Warn("DropChannel failed", zap.String("vChannel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
log.Info("DropChannel succeeded", zap.String("vChannel", channel))
|
||||
err = h.s.meta.DropChannelCheckpoint(channel)
|
||||
if err != nil {
|
||||
log.Warn("DropChannel failed to drop channel checkpoint", zap.String("channel", channel), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
log.Info("DropChannel succeeded", zap.String("channel", channel))
|
||||
// Channel checkpoints are cleaned up during garbage collection.
|
||||
|
||||
// clean collection info cache when meet drop collection info
|
||||
|
@ -1727,6 +1727,7 @@ func (m *meta) DropChannelCheckpoint(vChannel string) error {
|
||||
return err
|
||||
}
|
||||
delete(m.channelCPs.checkpoints, vChannel)
|
||||
metrics.DataCoordCheckpointUnixSeconds.DeleteLabelValues(fmt.Sprint(paramtable.GetNodeID()), vChannel)
|
||||
log.Info("DropChannelCheckpoint done", zap.String("vChannel", vChannel))
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user