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
storage, lock_manager: Use the new lock waiting queue instead of WaiterManager to handle pessimistic lock waking up #13447
Merged
ti-chi-bot
merged 78 commits into
tikv:master
from
MyonKeminta:m/new-lock-waiting-queue
Oct 26, 2022
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
e1c0e5c
add new lock waiting queue
MyonKeminta 89872af
Port new implementation of waiter manager from #12749
MyonKeminta eb2e51f
Fix some potential concurrency issues
MyonKeminta 3ac944a
Make use of the new lock waiting queue in scheduler
MyonKeminta a85c333
Add tests for lock waiting queue
MyonKeminta 437ee61
Allow pushing forward the delayed wake up time
MyonKeminta 30fb395
Try not order by legacy wake up cnt
MyonKeminta 7e2b632
Add tests
MyonKeminta 97ce953
Add documents
MyonKeminta e6fce44
Add more comments
MyonKeminta af57580
Add lock wait queue and lock wait context; refactor storage::lock_man…
MyonKeminta f899ee1
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta e810deb
Remove commented code; remove debug level change in Cargo.toml
MyonKeminta c36257c
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta 38be4b7
Fix lint
MyonKeminta bae7c54
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta 8ca8ed1
Fix lint
MyonKeminta 3e43a3f
Fix tests
MyonKeminta b9fe9c8
Fix tests
MyonKeminta bdb117d
fix lint
MyonKeminta efac233
Fix is_first_lock test and remove some commented code
MyonKeminta ff248e4
Fix tests
MyonKeminta 1685e9d
Add document to explain how `legacy_wake_up_cnt` works
MyonKeminta df8ce96
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta a986eb2
Adapt the test for waking up
MyonKeminta 3f9d878
Fix lint
MyonKeminta 4dce9c1
Remove the comparator wrapper
MyonKeminta 44d3eea
Move SharedError to storage/error.rs
MyonKeminta e18bf41
Remove Clone on PessimisticLockParameters which is not used yet
MyonKeminta a624ee9
Fix lint
MyonKeminta 821d414
Fix lint
MyonKeminta a23cab9
Address comments
MyonKeminta 51037df
Add metrics for the new lock waiting queue
MyonKeminta eae8902
Address comments
MyonKeminta 8826a30
Address comments
MyonKeminta 7338f53
Merge branch 'master' into m/new-lock-waiting-queue-part
ti-chi-bot 9f25907
Merge branch 'master' into m/new-lock-waiting-queue-part
ti-chi-bot 9e79ab2
Merge branch 'master' into m/new-lock-waiting-queue-part
ti-chi-bot cb6f1ca
Merge branch 'master' into m/new-lock-waiting-queue-part
ti-chi-bot 8e1fb44
Set write conflict reason
MyonKeminta 439fbc8
Merge branch 'm/new-lock-waiting-queue-part' of https://github.com/My…
MyonKeminta 9d3b76f
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta 1258793
Merge branch 'm/new-lock-waiting-queue-part' into m/new-lock-waiting-…
MyonKeminta c7038ab
Merge commit '9321040' into m/new-lock-waiting-queue
MyonKeminta 4306dac
Merge commit '9321040' into m/new-lock-waiting-queue-metrics
MyonKeminta 02c67e2
Merge branch 'm/new-lock-waiting-queue-metrics' into m/new-lock-waiti…
MyonKeminta 4fc6177
Fix build
MyonKeminta 3f77213
Fix build
MyonKeminta ecae239
Add self-made heap
MyonKeminta ffb9785
Use the HashMap in tikv_util
MyonKeminta a0e44e2
Use the new priority queue to replace the std binary heap in lock wai…
MyonKeminta b534c19
Merge branch 'm/new-lock-waiting-queue-remove-stale' into m/new-lock-…
MyonKeminta 6e516ba
Fix build and tests
MyonKeminta b132f81
fix build
MyonKeminta ae7d572
Add priority queue to tikv_utils
MyonKeminta 6cf249b
Add comments
MyonKeminta bb9d52c
Merge commit 'ae7d5722f' into m/new-lock-waiting-queue-remove-stale
MyonKeminta 90ab847
Merge branch 'm/priority-queue' into m/new-lock-waiting-queue-remove-…
MyonKeminta f70811b
Merge branch 'm/new-lock-waiting-queue-remove-stale' into m/new-lock-…
MyonKeminta a5e6124
Revert "Use the HashMap in tikv_util"
MyonKeminta f2f2834
Revert "Add self-made heap"
MyonKeminta 1caf48a
Use third-party crate keyed_priority_queue instead of the self-writte…
MyonKeminta 404b59f
Merge remote-tracking branch 'upstream/master' into m/new-lock-waitin…
MyonKeminta 403375b
Merge branch 'm/new-lock-waiting-queue-remove-stale' into m/new-lock-…
MyonKeminta 7d959cb
Remove `finished` flag
MyonKeminta 75199bc
Merge branch 'm/new-lock-waiting-queue-remove-stale' into m/new-lock-…
MyonKeminta 3719265
Remove shared_state from WriteResultLockInfo
MyonKeminta 4f7c58e
Merge branch 'master' into m/new-lock-waiting-queue-remove-stale
sticnarf b0d77ec
Merge remote-tracking branch 'origin/m/new-lock-waiting-queue-remove-…
MyonKeminta d8e5dfe
Merge branch 'master' of https://github.com/tikv/tikv into m/new-lock…
MyonKeminta 50e5051
Address comments
MyonKeminta a928ea2
Address comments
MyonKeminta effffc7
Remove obsolete metric
MyonKeminta c0abfdf
Address comments
MyonKeminta 4785619
Update grafana dashboard
MyonKeminta 4005b10
Address comments
MyonKeminta 77caef7
Address comments
MyonKeminta e7c4c70
Merge branch 'master' into m/new-lock-waiting-queue
ti-chi-bot File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only the config
wake_up_delay_duration
need to print log?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logs about the two config items mentioned here were previously printed in
waiter_manager.rs
when handlingTask::ChangeConfig
message. Now thewake_up_delay_duration
is changed to be handled somewhere else, so I printed it here. When changingwait_for_lock_timeout
, the log will still be printed at the old place.