Skip to content

Optimize grpc forward and switch leader logic#324

Merged
marsishandsome merged 23 commits intotikv:release-3.1from
birdstorm:optimize-grpc-forward-and-switch-leader
Nov 19, 2021
Merged

Optimize grpc forward and switch leader logic#324
marsishandsome merged 23 commits intotikv:release-3.1from
birdstorm:optimize-grpc-forward-and-switch-leader

Conversation

@birdstorm
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
@birdstorm birdstorm changed the base branch from master to release-3.1 November 13, 2021 14:05
birdstorm and others added 15 commits November 14, 2021 14:01
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: Little-Wallace <bupt2013211450@gmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
@marsishandsome marsishandsome changed the title [WIP] Optimize grpc forward and switch leader logic Optimize grpc forward and switch leader logic Nov 17, 2021
@marsishandsome
Copy link
Copy Markdown
Collaborator

/run-all-tests

boolean exceptionEncountered = pair.second;
if (peer == null) {
if (!exceptionEncountered) {
// all response returned normally, the leader is not elected, just wait until it is ready.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

will it retry forever if the client is disconnected from all the tikv servers?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

will do in next pr

String.format(
"leader for region[%d] is not elected, just wait until it is ready",
region.getId()));
return true;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we remove this branch?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

will do in next pr

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
zz-jason
zz-jason previously approved these changes Nov 18, 2021
Copy link
Copy Markdown
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Copy Markdown
Member

format failed

Signed-off-by: birdstorm <samuelwyf@hotmail.com>
@birdstorm
Copy link
Copy Markdown
Collaborator Author

@zz-jason PTAL

@birdstorm
Copy link
Copy Markdown
Collaborator Author

/merge

@ti-srebot
Copy link
Copy Markdown
Collaborator

/run-all-tests

Copy link
Copy Markdown
Collaborator

@marsishandsome marsishandsome left a comment

Choose a reason for hiding this comment

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

LGTM

@marsishandsome marsishandsome merged commit b60afd0 into tikv:release-3.1 Nov 19, 2021
@birdstorm birdstorm deleted the optimize-grpc-forward-and-switch-leader branch November 19, 2021 05:37
marsishandsome pushed a commit to marsishandsome/client-java that referenced this pull request Dec 1, 2021
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants