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

store: update kvrpc.Cleanup proto and change its behaviour #12212

Merged
merged 15 commits into from Sep 23, 2019

Conversation

@tiancaiamao
Copy link
Contributor

commented Sep 16, 2019

What problem does this PR solve?

Check the TTL on the primary lock to decide the real status of a transaction.
After we update the TTL of a transaction, the TTL information on the secondary lock is not accurate.

What is changed and how it works?

Before this PR, Cleanup always rollbacks a transaction if it's not committed.
After this PR, Cleanup will not rollback a transaction if the primary lock is active.

Check List

Tests

  • Unit test

Side effects

  • Breaking backward compatibility

The semantics of Cleanup API change.

Release note

  • Write release note for bug-fix or new feature.
Before this PR, Cleanup always rollback a transaction if it's not committed.
After this PR, Cleanup will not rollback a transaction if the lock is active.
@codecov

This comment has been minimized.

Copy link

commented Sep 16, 2019

Codecov Report

Merging #12212 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #12212   +/-   ##
===========================================
  Coverage   81.2941%   81.2941%           
===========================================
  Files           454        454           
  Lines        100033     100033           
===========================================
  Hits          81321      81321           
  Misses        12926      12926           
  Partials       5786       5786
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2019

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2019

/run-all-tests

store/mockstore/mocktikv/mvcc_leveldb.go Outdated Show resolved Hide resolved
store/mockstore/mocktikv/mvcc_leveldb.go Show resolved Hide resolved
store/mockstore/mocktikv/mvcc_leveldb.go Outdated Show resolved Hide resolved
store/tikv/lock_resolver.go Outdated Show resolved Hide resolved
@coocood

This comment has been minimized.

Copy link
Member

commented on store/tikv/lock_resolver.go in 8f09776 Sep 17, 2019

I mean we don't need to check msBeforeLockExpired <= 0

tiancaiamao added 4 commits Sep 17, 2019
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

/run-all-tests tikv=pr/5471

tiancaiamao added 2 commits Sep 18, 2019
@coocood

This comment has been minimized.

Copy link
Member

commented Sep 18, 2019

LGTM

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

/run-all-tests tikv=pr/5471

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

/run-all-tests tikv=pr/5471

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

/run-all-tests tikv=pr/5471

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

Copy link
Contributor

left a comment

LGTM

@coocood

This comment has been minimized.

Copy link
Member

commented Sep 23, 2019

LGTM

Copy link
Contributor

left a comment

LGTM. But I hope if there are more comments in ResolveLocks' logic. I found it difficult to understand.

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

/run-all-tests

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

commented Sep 23, 2019

/run-unit-test

@tiancaiamao tiancaiamao merged commit 48557f7 into pingcap:master Sep 23, 2019
13 checks passed
13 checks passed
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@tiancaiamao tiancaiamao deleted the tiancaiamao:clean-up branch Sep 23, 2019
@sre-bot

This comment has been minimized.

Copy link

commented Sep 23, 2019

cherry pick to release-3.0 failed

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.