Skip to content

refactor(lock): simplify acquired lock tracking#62374

Open
joshtrichards wants to merge 2 commits into
masterfrom
jtr/refactor-lock-LockingProviders
Open

refactor(lock): simplify acquired lock tracking#62374
joshtrichards wants to merge 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

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

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>
@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
For use by providers

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress 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.

1 participant