fix fg metrics (#23139)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
wei liu 2023-03-31 14:12:23 +08:00 committed by GitHub
parent ea382f3305
commit 315d468b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,6 +281,7 @@ func (dsService *dataSyncService) removeEmptyFlowGraphByChannel(collectionID int
dsService.metaReplica.removeCollectionVDeltaChannel(collectionID, dc)
// close flowgraph first, so no write will be dispatched to tSafeReplica
fg.close()
metrics.QueryNodeNumFlowGraphs.WithLabelValues(fmt.Sprint(Params.QueryNodeCfg.GetNodeID())).Dec()
dsService.tSafeReplica.removeTSafe(dc)
// try best to remove, it's ok if all info is gone before this call
rateCol.removeTSafeChannel(dc)