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

Updated locking to include locks on files. This is critical to prevent #163

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

hqakhtar
Copy link
Contributor

Updated locking to include locks on files. This is critical to prevent parallel updates during the:
(a) map entry selection
(b) master key rotation.

The locks are essentially constructed in a 2PL phase where necessary with an outer lock for the files and the inner one for the cache.

Note that we don't need to ever acquire an exclusive lock on the keydata file as the same location can never be selected as long as we selected it via an exclusive lock on the map file.

parallel updates during the:
(a) map entry selection
(b) master key rotation.

The locks are essentially constructed in a 2PL phase where necessary with
an outer lock for the files and the inner one for the cache.

Note that we don't need to ever acquire an exclusive lock on the keydata
file as the same location can never be selected as long as we selected it
via an exclusive lock on the map file.
@codeforall codeforall merged commit b5bf877 into percona:main Apr 1, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants