Skip to content

fix(lock): keep first saved TTL across nested shared locks - #66165

Open
lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66164-shared-lock-ttl
Open

lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66164-shared-lock-ttl

Conversation

@lazerg

@lazerg lazerg commented Nov 3, 2026

Copy link
Copy Markdown

Summary

MemcacheLockingProvider::acquireLock saved the lock's TTL on every shared acquisition, so a nested shared lock on the same path (like the version copy during an overwrite) replaced the saved value with the freshly renewed TTL. When the upgrade to an exclusive lock then failed, restoreTTL put back that renewed value and a leaked shared lock never expired while the client kept retrying.

The TTL is now only saved when the request doesn't already hold a shared lock on the path, which is the smaller fix suggested in the issue. Added a test with a TTL-aware cache that fails before the change.

TODO

  • ...

Checklist

AI (if applicable)

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

Assisted-by: ClaudeCode:claude-opus-5-5

Signed-off-by: lazerg <lazerg2@gmail.com>
@lazerg
lazerg requested a review from a team as a code owner November 3, 2026 06:53
@lazerg
lazerg requested review from Altahrim, icewind1991, salmart-dev and sorbaugh and removed request for a team November 3, 2026 06:53

This branch has not been deployed

No deployments
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.

[Bug]: Retrying an overwrite with versions enabled keeps leaked shared locks alive indefinitely

1 participant