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

executor: implemented exclusive lock for temp storage dir per tidb instance (#15203) #16026

Merged
merged 2 commits into from
Apr 4, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 2, 2020

cherry-pick #15203 to release-4.0


What problem does this PR solve?

fixes #13981

What is changed and how it works?

Check List

Tests

  • Manual test (add detailed scripts or steps below)

run tidb-server using the default config

➜  tidb git:(exclusive-temp-dir-access) ./bin/tidb-server 
......
[2020/03/08 12:34:24.375 +13:00] [INFO] [delete_range.go:133] ["[ddl] start delRange emulator"]                                      │
[2020/03/08 12:34:24.375 +13:00] [INFO] [ddl_worker.go:130] ["[ddl] start DDL worker"] [worker="worker 1, tp general"]               │
[2020/03/08 12:34:24.375 +13:00] [INFO] [ddl_worker.go:130] ["[ddl] start DDL worker"] [worker="worker 2, tp add index"]             │
[2020/03/08 12:34:24.381 +13:00] [INFO] [domain.go:144] ["full load InfoSchema success"] [usedSchemaVersion=0] [neededSchemaVersion=2│
2] ["start time"=5.728701ms]                                                                                                         │
[2020/03/08 12:34:24.381 +13:00] [INFO] [domain.go:368] ["full load and reset schema validator"]                                     │
[2020/03/08 12:34:24.389 +13:00] [INFO] [server.go:217] ["secure connection is enabled"] ["client verification enabled"=false]       │
[2020/03/08 12:34:24.389 +13:00] [INFO] [server.go:231] ["server is running MySQL protocol"] [addr=0.0.0.0:4000]                     │
[2020/03/08 12:34:24.390 +13:00] [INFO] [http_status.go:266] ["for status and metrics report"] ["listening on addr"=0.0.0.0:10080]   │
[2020/03/08 12:34:24.390 +13:00] [INFO] [domain.go:1015] ["init stats info time"] ["take time"=2.268267ms]    

run another tidb-server on the same machine using the default config

➜  tidb git:(exclusive-temp-dir-access) ✗ ./bin/tidb-server 
acquire the lock of temp storage dir err: fslock: lock is held

Code changes

@sre-bot sre-bot requested a review from a team as a code owner April 2, 2020 14:38
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 2, 2020

/run-all-tests

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 3, 2020
@zz-jason zz-jason removed the request for review from XuHuaiyu April 3, 2020 09:21
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SunRunAway SunRunAway added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 4, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 4, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 4, 2020

@sre-bot merge failed.

@SunRunAway
Copy link
Contributor

/run-common-test

@SunRunAway SunRunAway merged commit ce9db4b into pingcap:release-4.0 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config contribution This PR is from a community contributor. sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants