Conversation
Text releases its file lock only when the last session is closed cleanly. Closing the browser tab, a crash, or a mobile app destroying its web view never sends that close. A clean close shortly after a reload still counts the abandoned session as active. Since the cleanup job stopped resetting documents, nothing released these locks, and other clients got 423 Locked until someone ran occ text:reset. The cleanup job now releases the lock once the last session of a document has become inactive. It keeps the document and its sessions, so offline users can still reconnect later. Fixes: #9042 Fixes: #8769 Refs: #9628 Signed-off-by: Jonas <jonas@freesources.org> Assisted-by: ClaudeCode:claude-opus-5-5
The cleanup job only releases locks of documents whose last session became inactive since its previous run. Locks that leaked before that change stay in place, and files remain locked until someone runs occ text:reset. A repair step now queues a background job that goes through all documents once and releases the lock of those without active sessions. It runs in batches so upgrades stay fast. Both jobs share the release logic, and the lock is now checked before the filesystem is set up. Refs: #9042 Refs: #9628 Signed-off-by: Jonas <jonas@freesources.org> Assisted-by: ClaudeCode:claude-opus-5-5
Closing a session released the file lock only if no other session had contact in the last five minutes. A tab that was closed or crashed a few minutes earlier therefore kept the file locked after the last clean close, until the cleanup job released it. Sessions now keep the lock only while they had contact within the last two minutes. That still covers open editors in throttled background tabs. Other tabs and devices of the same user and guests still keep the lock. The cleanup jobs use the same rule. Refs: #9042 Refs: #9603 Signed-off-by: Jonas <jonas@freesources.org> Assisted-by: ClaudeCode:claude-opus-5-5
mejo-
force-pushed
the
backport/9673/stable34
branch
from
November 24, 2026 13:22
23bfa67 to
38136bc
Compare
mejo-
marked this pull request as ready for review
November 24, 2026 13:26
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
mejo-
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #9673
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.