pingcap / tispark

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

optimize ttl #2669

Closed shiyuhang0 closed 1 year ago

shiyuhang0 commented 1 year ago

What problem does this PR solve?

when RowIDAllocator uses 2pc to write with the TTL=3600s. Once it failed and leaves the lock, TiSpark can not resolve the lock until 3600s later for the lock is not expired.

For example, read may push the min_commit_ts, causing the RowIDAllocator 2pc to fail with commit_ts_expired. Then the retry can not success for lock ttl is too long.

What is changed and how it works?

just set ttl to 10s

Check List

Tests

Code changes

Side effects

Related changes

ti-chi-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

/merge

ti-chi-bot commented 1 year ago

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

Commit hash: 7cb9b80cc5c5b42f7bb5d628a362522f99d23ba8

ti-chi-bot commented 1 year ago

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

ti-chi-bot commented 1 year ago

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

ti-chi-bot commented 1 year ago

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