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

*: improve some logs #1511

Closed
wants to merge 0 commits into from
Closed

*: improve some logs #1511

wants to merge 0 commits into from

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Apr 17, 2019

What problem does this PR solve?

We recently encountered a problem, which PD cannot delete the leader key due to somewhere hanging. So the new leader cannot be elected. Such problems are not easy to trace once the scene didn't be saved. We can't check the goroutine status. Under this circumstance, it's hard for us to know if this hanging is caused by our code or etcd. For now, we need to wait for some goroutines to exit before deleting the key. And we don't know if these goroutines exit accurately.

What is changed and how it works?

This PR improves some logs to help us trace the problem better.

Check List

Tests

  • Unit test

@rleungx rleungx added the component/log Log. label Apr 17, 2019
@rleungx rleungx requested review from nolouch and disksing April 17, 2019 06:18
@nolouch
Copy link
Contributor

nolouch commented Apr 17, 2019

/rebuild

@codecov-io
Copy link

Codecov Report

Merging #1511 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1511      +/-   ##
==========================================
+ Coverage   67.48%   67.68%   +0.19%     
==========================================
  Files         158      158              
  Lines       15550    15557       +7     
==========================================
+ Hits        10494    10529      +35     
+ Misses       4094     4074      -20     
+ Partials      962      954       -8
Impacted Files Coverage Δ
server/region_syncer/server.go 81.89% <100%> (ø) ⬆️
server/cluster.go 75.26% <100%> (-0.35%) ⬇️
server/leader.go 78.83% <100%> (-1.42%) ⬇️
server/coordinator.go 84.4% <100%> (+0.06%) ⬆️
client/client.go 68.77% <0%> (+0.21%) ⬆️
server/handler.go 55.58% <0%> (+0.51%) ⬆️
server/schedule/operator_controller.go 93.65% <0%> (+0.79%) ⬆️
server/schedule/region_scatterer.go 88.23% <0%> (+2.2%) ⬆️
... and 6 more

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 22032cb...7cc2821. Read the comment docs.

server/leader.go Outdated Show resolved Hide resolved
server/cluster.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants