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

same owner should be able to convert an EXCLUSIVE lock to a SHARED lock by requesting the SHARED lock (redis meta, flock, posix) #4197

Closed
wants to merge 5 commits into from

Conversation

dbotwinick
Copy link

I moved the call to delete lkey from owners in meta/redis_lock.go so that flock would support converting an EXCLUSIVE lock to a SHARED lock for the same owner. As originally implemented, if there is any WRITE lock, then the lock operation should return EAGAIN which is problematic for calls that are not explicitly non-blocking intended to convert an EXCLUSIVE lock to a SHARED lock. I've been coming across blocking lock "downgrade" scenarios for database software.

TODO:

  • Does this need to be applied to other meta implementations?
  • Does this change have any other implications?
  • Does this change only make sense in the ofd_lock branch?

@CLAassistant
Copy link

CLAassistant commented Nov 24, 2023

CLA assistant check
All committers have signed the CLA.

@dbotwinick dbotwinick changed the title same owner should be able to convert an EXCLUSIVE lock to a SHARED lock by requesting the SHARED lock (redis meta) same owner should be able to convert an EXCLUSIVE lock to a SHARED lock by requesting the SHARED lock (redis meta, flock, posix) Nov 24, 2023
@dbotwinick dbotwinick changed the base branch from ofd_lock to main November 24, 2023 22:44
@dbotwinick dbotwinick changed the base branch from main to ofd_lock November 24, 2023 22:45
@davies
Copy link
Contributor

davies commented Nov 25, 2023

This is already fixed in main branch by #4179

@davies davies closed this Nov 25, 2023
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