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

tikv/resolvelock: resolve lock in a batch #2389

Merged
merged 22 commits into from Nov 11, 2017

Conversation

Projects
None yet
10 participants
@atmzhou
Contributor

atmzhou commented Oct 17, 2017

This tikv resolves lock in a batch.

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Oct 17, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Oct 17, 2017

CLA assistant check
All committers have signed the CLA.

Show outdated Hide outdated src/server/service/kv.rs Outdated
@siddontang

This comment has been minimized.

Show comment
Hide comment
@siddontang

siddontang Oct 17, 2017

Contributor

do we have a test to resolve many locks in a batch?

Contributor

siddontang commented Oct 17, 2017

do we have a test to resolve many locks in a batch?

Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
@ngaut

This comment has been minimized.

Show comment
Hide comment
@ngaut

ngaut Oct 18, 2017

Member

Please clean up your commit messages.

Member

ngaut commented Oct 18, 2017

Please clean up your commit messages.

atmzhou added some commits Oct 23, 2017

@atmzhou

This comment has been minimized.

Show comment
Hide comment
@atmzhou
Contributor

atmzhou commented Oct 23, 2017

@arthurprs

This comment has been minimized.

Show comment
Hide comment
@arthurprs

arthurprs Oct 23, 2017

Is this in a hot path? If so it might be better to use HashMap from util::collections instead.

arthurprs commented Oct 23, 2017

Is this in a hot path? If so it might be better to use HashMap from util::collections instead.

Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated src/storage/mod.rs Outdated
Show outdated Hide outdated src/storage/mod.rs Outdated
Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated tests/storage/sync_storage.rs Outdated
Show outdated Hide outdated tests/storage/sync_storage.rs Outdated
Show outdated Hide outdated tests/storage/sync_storage.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated

atmzhou added some commits Oct 24, 2017

git pull
Merge branch 'ningnanzhou/batchlockresolve' of https://github.com/pingcap/tikv into ningnanzhou/batchlockresolve
Show outdated Hide outdated tests/storage/test_storage.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
@zhangjinpeng1987

This comment has been minimized.

Show comment
Hide comment
@zhangjinpeng1987
Member

zhangjinpeng1987 commented Oct 27, 2017

LGTM

@zhangjinpeng1987

This comment has been minimized.

Show comment
Hide comment
@zhangjinpeng1987
Member

zhangjinpeng1987 commented Oct 27, 2017

scan_key = Some(k.to_owned());
write_size += txn.write_size();
modifies.append(&mut txn.modifies());
if write_size >= MAX_TXN_WRITE_SIZE {

This comment has been minimized.

@zhangjinpeng1987

zhangjinpeng1987 Oct 28, 2017

Member

Please adjust MAX_TXN_WRITE_SIZE and RESOLVE_LOCK_BATCH_SIZE to make scan_lock never scan duplicated keys.

@zhangjinpeng1987

zhangjinpeng1987 Oct 28, 2017

Member

Please adjust MAX_TXN_WRITE_SIZE and RESOLVE_LOCK_BATCH_SIZE to make scan_lock never scan duplicated keys.

@siddontang

This comment has been minimized.

Show comment
Hide comment
@siddontang
Contributor

siddontang commented Oct 30, 2017

Show outdated Hide outdated src/server/service/kv.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
Show outdated Hide outdated src/storage/txn/scheduler.rs Outdated
Show outdated Hide outdated tests/storage/sync_storage.rs Outdated
Show outdated Hide outdated tests/storage/test_storage.rs Outdated
@AndreMouche

LGTM

Show outdated Hide outdated src/server/service/kv.rs Outdated
@siddontang

Rest LGTM

disksing added some commits Nov 10, 2017

@disksing

This comment has been minimized.

Show comment
Hide comment
@disksing

disksing Nov 10, 2017

Collaborator
Collaborator

disksing commented Nov 10, 2017

@disksing

This comment has been minimized.

Show comment
Hide comment
@disksing

disksing Nov 10, 2017

Collaborator

/run-all-tests

Collaborator

disksing commented Nov 10, 2017

/run-all-tests

@disksing

This comment has been minimized.

Show comment
Hide comment
@disksing

disksing Nov 10, 2017

Collaborator

/run-all-tests

Collaborator

disksing commented Nov 10, 2017

/run-all-tests

@iamxy

This comment has been minimized.

Show comment
Hide comment
@iamxy

iamxy Nov 10, 2017

Collaborator

/run-integration-ddl-test

Collaborator

iamxy commented Nov 10, 2017

/run-integration-ddl-test

@disksing disksing merged commit 8d936f1 into master Nov 11, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
jenkins-ci-tikv/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@disksing disksing deleted the ningnanzhou/batchlockresolve branch Nov 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment