Registry Mirror
Skip to content

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Backport of #9673

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
backportbot Bot requested review from benjaminfrueh and mejo- November 24, 2026 13:06
@backportbot backportbot Bot added bug Something isn't working 3. to review client: 🤖🍏 mobile AI assisted This PR contains AI-assisted commits labels Nov 24, 2026
@backportbot backportbot Bot added this to the Nextcloud 34.0.7 milestone Nov 24, 2026
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-
mejo- force-pushed the backport/9673/stable34 branch from 23bfa67 to 38136bc Compare November 24, 2026 13:22
@mejo-
mejo- marked this pull request as ready for review November 24, 2026 13:26
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mejo-
mejo- merged commit 2f459a4 into stable34 Nov 24, 2026
73 checks passed
@mejo-
mejo- deleted the backport/9673/stable34 branch November 24, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review AI assisted This PR contains AI-assisted commits bug Something isn't working client: 🤖🍏 mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant