pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.39k stars 5.73k forks source link

executor,kv: support timebounded staleness transaction #23866

Closed Yisaer closed 3 years ago

Yisaer commented 3 years ago

Signed-off-by: yisaer disxiaofei@163.com

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/19817

Problem Summary: Support time bounded staleness transaction.

What is changed and how it works?

What's Changed: Support time bounded staleness transaction by:

  1. maintaining resolveTS for each store in an extra goroutine.
  2. support time-bounded staleness transaction in executeBegin

Check List

Tests

I have tested it with https://github.com/tikv/tikv/pull/9791, it seems work well.

Release note

ti-srebot commented 3 years ago

No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md

ti-srebot commented 3 years ago

No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md

Yisaer commented 3 years ago

/cc @xhebox

ti-chi-bot commented 3 years ago

@JmPotato: /lgtm cancel is only allowed for the PR author or the reviewers in list.

In response to [this](https://github.com/pingcap/tidb/pull/23866#pullrequestreview-633107708): > Instructions for interacting with me using PR comments are available [here](https://prow.tidb.io/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
xhebox commented 3 years ago

/lgtm

ti-chi-bot commented 3 years ago

@JmPotato: /lgtm is only allowed for the reviewers in list.

In response to [this](https://github.com/pingcap/tidb/pull/23866#pullrequestreview-634268722): > Instructions for interacting with me using PR comments are available [here](https://prow.tidb.io/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.
Yisaer commented 3 years ago

/cc @djshow832

djshow832 commented 3 years ago

/lgtm

ti-chi-bot commented 3 years 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 writing `/lgtm` in a comment. Reviewer can cancel approval by writing `/lgtm cancel` in a comment.
djshow832 commented 3 years ago

/merge

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

Yisaer commented 3 years ago

/merge

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

Yisaer commented 3 years ago

We need to wait https://github.com/tikv/tikv/pull/9385 to be merged, then merge this pr.

ti-chi-bot commented 3 years ago

/run-all-tests

This bot automatically retries jobs that failed on can merge PRs (send feedback to hi-rustin).

Silence the bot with the /merge cancel comment for consistent failures.

hi-rustin commented 3 years ago

@Yisaer Silence the bot with the /merge cancel comment for consistent failures.

hi-rustin commented 3 years ago

A PR for a draft that can be merged looks very strange, so I suggest you unmerge first until another PR lands.

xhebox commented 3 years ago

/merge cancel

hi-rustin commented 3 years ago

We need to wait tikv/tikv#9385 to be merged, then merge this pr.

You can use the /hold command to prevent the merging of PR. No need to convert to draft.

hi-rustin commented 3 years ago

/hold

Yisaer commented 3 years ago

/merge

ti-chi-bot commented 3 years ago

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

Commit hash: f8adbd90a8dd17867388ac0dcfe522e81245a0ee

JmPotato commented 3 years ago

/run-unit-test

JmPotato commented 3 years ago

/unit-test

Yisaer commented 3 years ago

/merge

ti-chi-bot commented 3 years ago

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

Commit hash: 527e7b60a50a16f98c3070f31e1ef48711fe79ad

Yisaer commented 3 years ago

/merge

ti-chi-bot commented 3 years ago

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

Commit hash: 55ec8baef73797bc91e1eb92c3c90941ebdcdf13