Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: move log operation out of the lock scope #11536

Merged
merged 3 commits into from
Jul 31, 2019

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Tiny refactor

What is changed and how it works?

It's a bad style to print log under a lock, tiny refactor to make the code better.
Lock() is also changed to RLock() to reduce lock contend

Check List

Tests

  • No code

It's a bad style to print log under a lock, tiny refactor to make the code better.
Lock() is also changed to RLock() to reduce lock contend
@tiancaiamao tiancaiamao added component/server type/enhancement The issue or PR belongs to an enhancement. labels Jul 31, 2019
@tiancaiamao
Copy link
Contributor Author

PTAL @jackysp @crazycs520

@codecov
Copy link

codecov bot commented Jul 31, 2019

Codecov Report

Merging #11536 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11536   +/-   ##
===========================================
  Coverage   81.3019%   81.3019%           
===========================================
  Files           425        425           
  Lines         91662      91662           
===========================================
  Hits          74523      74523           
  Misses        11787      11787           
  Partials       5352       5352

Copy link
Member

@ngaut ngaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackysp jackysp added the status/can-merge Indicates a PR has been approved by a committer. label Jul 31, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 31, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jul 31, 2019

@tiancaiamao merge failed.

@ngaut ngaut merged commit 8f51214 into pingcap:master Jul 31, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 31, 2019

cherry pick to release-3.0 failed

@tiancaiamao tiancaiamao deleted the log-under-lock branch July 31, 2019 12:29
@sre-bot
Copy link
Contributor

sre-bot commented Apr 7, 2020

It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @tiancaiamao PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server status/can-merge Indicates a PR has been approved by a committer. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants