From 102f391c4ddc6ce4a4343dec77c4a85318099ee9 Mon Sep 17 00:00:00 2001 From: Walther Lee Date: Fri, 16 Aug 2024 09:43:44 -0700 Subject: [PATCH] fix(discovery) configure sharding every time MetricsHandler.Run runs Signed-off-by: Walther Lee --- pkg/metricshandler/metrics_handler.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkg/metricshandler/metrics_handler.go b/pkg/metricshandler/metrics_handler.go index 62543785b0..85f030bab5 100644 --- a/pkg/metricshandler/metrics_handler.go +++ b/pkg/metricshandler/metrics_handler.go @@ -132,14 +132,6 @@ func (m *MetricsHandler) Run(ctx context.Context) error { return } - m.mtx.RLock() - shardingUnchanged := m.curShard == shard && m.curTotalShards == totalShards - m.mtx.RUnlock() - - if shardingUnchanged { - return - } - m.ConfigureSharding(ctx, shard, totalShards) }, UpdateFunc: func(oldo, curo interface{}) {