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
channelz: use atomic instead of mutex #2218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @lyuxuan)
clientconn.go, line 726 at r1 (raw file):
} type channelzData struct {
Comment why this struct is necessary.
And move to another file since it's used by both client and server.
clientconn.go, line 730 at r1 (raw file):
callsFailed int64 callsSucceeded int64 lastCallStartedTime int64
Comment what the format is and why.
clientconn.go, line 761 at r1 (raw file):
channelzID int64 // channelz unique identification number czmu sync.RWMutex
Remove this mutex
internal/transport/http2_client.go, line 117 at r1 (raw file):
} type channelzData struct {
Move to another file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 6 files reviewed, 3 unresolved discussions (waiting on @menghanl and @lyuxuan)
rpc_util.go, line 761 at r2 (raw file):
callsFailed int64 callsSucceeded int64 lastCallStartedTime int64
Comment the format and reason for this.
internal/transport/transport.go, line 752 at r2 (raw file):
msgSent int64 msgRecv int64 lastMsgSent int64
Comment the format and reason for this.
And add "Time" to the variable name so it's clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 4 files at r2, 4 of 4 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved
No description provided.