pingcap / tispark

TiSpark is built for running Apache Spark on top of TiDB/TiKV
Apache License 2.0
883 stars 244 forks source link

Retry when store is down in high layer #2710

Closed shiyuhang0 closed 1 year ago

shiyuhang0 commented 1 year ago

What problem does this PR solve?

https://github.com/pingcap/tispark/issues/2705

What is changed and how it works?

  1. when the store is unreachable or null, invalid cache and retry.

This enhancement will fix this situation: voter down and TiSpark fail

  1. catch the exception thrown by splitrange and retry

This enhancement will fix this situation: pd leader down and the region get from pd will be null then an exception will be thrown. According to the implementation of client-java, the switch leader needs to get members from pd, when it requests the down pd, it takes spark.tispark.grpc.timeout_in_sec(180s in default)*2 to retry, which may block the leader switch for spark.tispark.grpc.timeout_in_sec(180s in default)*2 s

Check List

Tests

Code changes

Side effects

Related changes

ti-chi-bot[bot] commented 1 year ago

[REVIEW NOTIFICATION]

This pull request has been approved by:

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment. After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.
shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

/merge

ti-chi-bot[bot] commented 1 year ago

This pull request has been accepted and is ready to merge.

Commit hash: 33af013a5b8cba638dbed874cf1de2b02dc113e7

ti-chi-bot commented 1 year ago

In response to a cherrypick label: new pull request created to branch release-3.2: #2714.