Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Txn() function signature refactor and remove ActivePendingTxn() (#8327) #8567

Merged
merged 2 commits into from Dec 5, 2018

Conversation

Projects
None yet
5 participants
@tiancaiamao
Copy link
Contributor

commented Dec 4, 2018

What problem does this PR solve?

Cherry pick from #8327

What is changed and how it works?

I thought #8327 is just a simple refactor, so I did not cherry pick that to release 2.1

But later it turns out that without the commit, release 2.1 will fail on this test #8566

@crazycs520 @winkyao


This change is Reviewable

*: Txn() function signature refactor and remove ActivePendingTxn() (#…
…8327)

* change Txn() function signature to Txn(active bool)
* ActivePendingTxn() is not used any more because Txn() does the work
* change executor builder getStartTS() uint64 to getStartTS() (uint64, error)
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Dec 4, 2018

/run-all-tests tidb-test=pr/674

@@ -125,7 +125,7 @@ func (e *CheckIndexRangeExec) Open(ctx context.Context) error {

func (e *CheckIndexRangeExec) buildDAGPB() (*tipb.DAGRequest, error) {
dagReq := &tipb.DAGRequest{}
dagReq.StartTs = e.ctx.Txn().StartTS()
dagReq.StartTs = e.ctx.Txn(true).StartTS()

This comment has been minimized.

Copy link
@crazycs520

crazycs520 Dec 4, 2018

Contributor

should check if sctx.Txn(true).Valid() first?

@pingcap pingcap deleted a comment from crazycs520 Dec 4, 2018

@winkyao
Copy link
Member

left a comment

LGTM

@zz-jason
Copy link
Member

left a comment

LGTM

@zz-jason zz-jason added the status/LGT2 label Dec 5, 2018

@jackysp jackysp merged commit b2382fb into pingcap:release-2.1 Dec 5, 2018

3 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@tiancaiamao tiancaiamao deleted the tiancaiamao:cherry-2.1-fix-txn branch Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.