@@ -139,8 +139,17 @@ func (p *pullerImpl) Run(ctx context.Context) error {
139139 metricEventCounterKv := kvEventCounter .WithLabelValues (captureAddr , changefeedID , "kv" )
140140 metricEventCounterResolved := kvEventCounter .WithLabelValues (captureAddr , changefeedID , "resolved" )
141141 metricTxnCollectCounterKv := txnCollectCounter .WithLabelValues (captureAddr , changefeedID , tableName , "kv" )
142- metricTxnCollectCounterResolved := txnCollectCounter .WithLabelValues (captureAddr , changefeedID , tableName , "kv" )
143-
142+ metricTxnCollectCounterResolved := txnCollectCounter .WithLabelValues (captureAddr , changefeedID , tableName , "resolved" )
143+ defer func () {
144+ outputChanSizeGauge .DeleteLabelValues (captureAddr , changefeedID , tableName )
145+ eventChanSizeGauge .DeleteLabelValues (captureAddr , changefeedID , tableName )
146+ memBufferSizeGauge .DeleteLabelValues (captureAddr , changefeedID , tableName )
147+ pullerResolvedTsGauge .DeleteLabelValues (captureAddr , changefeedID , tableName )
148+ kvEventCounter .DeleteLabelValues (captureAddr , changefeedID , "kv" )
149+ kvEventCounter .DeleteLabelValues (captureAddr , changefeedID , "resolved" )
150+ txnCollectCounter .DeleteLabelValues (captureAddr , changefeedID , tableName , "kv" )
151+ txnCollectCounter .DeleteLabelValues (captureAddr , changefeedID , tableName , "resolved" )
152+ }()
144153 g .Go (func () error {
145154 for {
146155 select {
0 commit comments