*: Introduce OptimisticTxnContextProvider for optimistic txn#35131
Merged
ti-chi-bot merged 103 commits intopingcap:masterfrom Jun 20, 2022
Merged
*: Introduce OptimisticTxnContextProvider for optimistic txn#35131ti-chi-bot merged 103 commits intopingcap:masterfrom
OptimisticTxnContextProvider for optimistic txn#35131ti-chi-bot merged 103 commits intopingcap:masterfrom
Conversation
…for optimistic mode
you06
reviewed
Jun 14, 2022
you06
approved these changes
Jun 15, 2022
1 task
ekexium
approved these changes
Jun 20, 2022
Collaborator
Author
|
/merge |
Member
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 7f56a89 |
Collaborator
Author
|
/run-unit-test |
1 similar comment
Collaborator
Author
|
/run-unit-test |
Member
|
@lcwangchao: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Collaborator
Author
|
/run-unit-test |
2 similar comments
Collaborator
Author
|
/run-unit-test |
Collaborator
Author
|
/run-unit-test |
Collaborator
Author
|
/run-mysql-test |
Collaborator
Author
|
/run-mysql-test |
morgo
added a commit
to morgo/tidb
that referenced
this pull request
Jun 28, 2022
* upstream/master: sessionctx: support encoding and decoding session variables (pingcap#35531) planner: add batch_point_get access object (pingcap#35230) sessionctx: set skipInit false for TiDBOptProjectionPushDown and TiDBOptAggPushDown (pingcap#35491) *: add support for disabling noop variables (pingcap#35496) lightning: add store write limiter (pingcap#35193) expression: avoid padding 0 when implicitly cast to binary (pingcap#35053) types: fix creating partition tables fail in ANSI_QUOTES mode (pingcap#35379) executor: add the missed runtime stats when the index merge partial task returns 0 row (pingcap#35297) statistics: batch insert topn and bucket when saving table stats (pingcap#35326) parser: Add support for INTERVAL expr unit + expr (pingcap#30253) (pingcap#35390) config: add missing nodelay example (pingcap#35255) *: Introduce `OptimisticTxnContextProvider` for optimistic txn (pingcap#35131) statistics: fix panic when using wrong globalStats.Indices key (pingcap#35424) *: fix store token is up to the limit in test (pingcap#35374) *: enable more flaky and update bazel config (pingcap#35500) ddl: expose getPrimaryKey() as a public method of model.TableInfo (pingcap#35512) expression, util: add `KeyWithoutTrimRightSpace` for collator (pingcap#35475) infoschema: try on each PD member until one succeeds or all fail (pingcap#35285)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #35130
Introduce OptimisticTxnContextProvider for optimistic txn
What is changed and how it works?
OnTxnEndtoTxnManagerand it will be called after a transaction a transaction committed or rollback. WhenOnTxnEndis called, the inner provider ofTxnManagerwill be set to nil indicating that the session is not in any transaction context now.TxnManager.GetTxnInfoSchema()will return the session's latest information schema instead of a nil value. The behavior can guarantee TxnManager.GetTxnInfoSchema()can get the expected information schema after a statement finished after a test liketk.MustExec` .sessionctx.ContextGetDomainInfoSchemato get the latest infoschema in domain. Different withdomain.InfoSchemathe new method returns a infoschema including the temporary tables in session. This new method also avoids some cycle dependency introduced bydomainpackage.PrepareTSFutureadded two parametersfutureandscope. The old future will be reset by the new one if it called multiple times.GetPreparedTSFuturereturns the current prepared future.sessionctx. InitTxnWithStartTSis removed because it will never be usedbaseTxnContextProviderwe still active the inner txn whentidb_snapshotis set andautocommit=1and remove the outer txn active codes: https://github.com/pingcap/tidb/pull/35131/files#diff-1b52d172a8cfc643ae8912c1fdf72c8d1d45a02842a2b4405b72d7daf49aeb0aL289OptimisticTxnContextProviderCheck List
Tests
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.