Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

utils: fix excessive refresh frequency when BR_LOG_TO_TERM=1 (#334)#341

Merged
overvenus merged 3 commits into
pingcap:release-4.0from
sre-bot:release-4.0-84717a8106a6
Jun 17, 2020
Merged

utils: fix excessive refresh frequency when BR_LOG_TO_TERM=1 (#334)#341
overvenus merged 3 commits into
pingcap:release-4.0from
sre-bot:release-4.0-84717a8106a6

Conversation

@sre-bot
Copy link
Copy Markdown
Contributor

@sre-bot sre-bot commented Jun 9, 2020

cherry-pick #334 to release-4.0


What problem does this PR solve?

Fix item 5 of #259.

What is changed and how it works?

  1. Do not start the progress bar before it was fully configured (so that the refresh rate can really be respected).
  2. Further increased the refresh rate when BR_LOG_TO_TERM=1 from 10s to 2m.
  3. Included more progress information into the log when BR_LOG_TO_TERM=1:
[2020/06/04 20:01:14.965 +00:00] [INFO] [progress.go:113] [progress] [step="Full restore"] [progress=29.18%] [count="700 / 2399"] [speed="11 p/s"] [elapsed=48s] [remaining=2m34s]

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
    • Execute BR manually with BR_LOG_TO_TERM=1 and inspect the output.

Code changes

Side effects

Related changes

Release Note

  • Reduced the excessive refresh rate of progress logs when logging to terminal (e.g. when using K8s).

@kennytm kennytm added the status/LGT2 LGTM2 label Jun 9, 2020
@overvenus overvenus added this to the v4.0.2 milestone Jun 10, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 17, 2020

Codecov Report

Merging #341 into release-4.0 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release-4.0     #341   +/-   ##
============================================
  Coverage        73.30%   73.30%           
============================================
  Files               51       51           
  Lines             5645     5645           
============================================
  Hits              4138     4138           
  Misses            1010     1010           
  Partials           497      497           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21917af...494061a. Read the comment docs.

@overvenus overvenus merged commit 469ffca into pingcap:release-4.0 Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants