-
Notifications
You must be signed in to change notification settings - Fork 225
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
log: group replica selector logging and split not leader errors #929
Conversation
/cc @crazycs520 PTAL |
internal/locate/region_request.go
Outdated
replica.store.storeID, | ||
replica.isEpochStale(), | ||
replica.attempts, | ||
replica.epoch, |
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.
Do we need to use atomic load on this variable?
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.
Thanks for the reminder. I understand the replica
should not be used concurrently as its lifetime is the same as the replicaSelector
, but I forget why atomic operations are used for the epoch updating.
557c9e6
to
826a612
Compare
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.
rest LGTM
@@ -1284,3 +1284,31 @@ func (s *testRegionRequestToThreeStoresSuite) TestSendReqFirstTimeout() { | |||
} | |||
} | |||
} | |||
|
|||
func (s *testRegionRequestToThreeStoresSuite) TestLogging() { |
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.
Seems a manual test?
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.
Yes.
Signed-off-by: cfzjywxk <[email protected]>
Signed-off-by: cfzjywxk <[email protected]>
826a612
to
9f88a2c
Compare
RegionRequestSender
andreplicaSelector
.totalErros
into details forNotLeader
error responses,from