Skip to content

refactor(lock): simplify acquired lock tracking - #62374

Merged
susnux merged 2 commits into
masterfrom
jtr/refactor-lock-LockingProviders
Dec 6, 2026
Merged

susnux merged 2 commits into
masterfrom
jtr/refactor-lock-LockingProviders

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Jul 21, 2026 •

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

  • Remove redundant inherited documentation
  • Simplify acquired-lock bookkeeping
  • Make the abstract tracking helpers consistently handle only shared and exclusive lock constants
  • A a lock type validator to the abstract class for use in follow-on PR (see Follow-up)

The existing provider tests provide reasonable indirect coverage of this bookkeeping.

Follow-up

This does not validate lock types at the provider boundaries. DBLockingProvider::acquireLock() and MemcacheLockingProvider::acquireLock() still treat any non-shared value as exclusive and an invalid value
can still flow through (though it will no longer be treated one way in markChange() and another by markAcquire()). This is already invalid per the contract, and can be addressed separately in the two provider implementations.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Jul 21, 2026
@joshtrichards joshtrichards added the 2. developing Work in progress label Jul 21, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner July 21, 2026 19:49
@joshtrichards joshtrichards added technical debt 🧱 🤔🚀 feature: locking ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Jul 21, 2026
@joshtrichards
joshtrichards requested review from Altahrim, come-nc, icewind1991 and leftybournes and removed request for a team July 21, 2026 19:49
@joshtrichards joshtrichards added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 22, 2026
This was referenced Aug 12, 2026
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 20, 2026
@skjnldsv skjnldsv mentioned this pull request Aug 25, 2026
Document the tracked lock state, remove redundant inherited documentation, and simplify shared and exclusive lock bookkeeping.

Signed-off-by: Josh <josh.t.richards@gmail.com>
For use by providers

Signed-off-by: Josh <josh.t.richards@gmail.com>
@susnux
susnux force-pushed the jtr/refactor-lock-LockingProviders branch from de89f0f to 5a7feb0 Compare December 6, 2026 01:27
@susnux
susnux merged commit 8ea647e into master Dec 6, 2026
152 of 154 checks passed
@susnux
susnux deleted the jtr/refactor-lock-LockingProviders branch December 6, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: locking ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) technical debt 🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants