From 7d433f16c4301d7398b45a392d58ab1b83d94b75 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Fri, 19 May 2023 04:45:05 +0800 Subject: [PATCH] before return make globalScannerMetrics.incTime call (#17230) --- cmd/data-scanner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/data-scanner.go b/cmd/data-scanner.go index d403447f4..af116cbb9 100644 --- a/cmd/data-scanner.go +++ b/cmd/data-scanner.go @@ -1346,11 +1346,11 @@ func (d *dynamicSleeper) Timer(ctx context.Context) func() { select { case <-ctx.Done(): if !timer.Stop() { - if d.isScanner { - globalScannerMetrics.incTime(scannerMetricYield, wantSleep) - } <-timer.C } + if d.isScanner { + globalScannerMetrics.incTime(scannerMetricYield, wantSleep) + } return case <-timer.C: if d.isScanner {