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

Fix duplicate calls of mainStorage.lock() in LockManager for version 1.* #165

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

RKrahl
Copy link
Member

@RKrahl RKrahl commented Jun 7, 2024

  • store the storage lock in class LockEntry rather than in class SingleLock,
  • as a consequence: obtain only one storage lock when mutliple shared locks are requested on the same dataset,
  • release the storage lock when the lock count drops to zero, e.g. when the last lock on the dataset is closed.

This fixes #164 for ids.server version 1.*.

- store the storage lock in class LockEntry rather than in class
  SingleLock,
- as a consequence: obtain only one storage lock when mutliple shared
  locks are requested on the same dataset,
- release the storage lock when the lock count drops to zero,
  e.g. when the last lock on the dataset is closed.
@RKrahl RKrahl added the bug Something isn't working label Jun 7, 2024
@RKrahl RKrahl added this to the 1.2.2 milestone Jun 7, 2024
@RKrahl
Copy link
Member Author

RKrahl commented Jun 7, 2024

Note: the CI build and test pipeline fails. But that looks like the icat-ansible ceased to support the old Java version used to build v1.*. The test succeed when I run them locally.

@RKrahl RKrahl modified the milestones: 1.2.2, 1.12.2 Jun 9, 2024
@RKrahl RKrahl requested a review from GonozalIX July 10, 2024 12:24
@RKrahl RKrahl merged commit d96cc3a into maint-v1 Jul 11, 2024
@RKrahl RKrahl deleted the maint-v1-lockmanager branch July 11, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants