Skip to content

[stable34] fix(sync): improve situation around false conflicts - #9551

Merged
mejo- merged 3 commits into
stable34from
backport/9542/stable34
Nov 4, 2026
Merged

mejo- merged 3 commits into
stable34from
backport/9542/stable34

Conversation

@backportbot

@backportbot backportbot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Backport of #9542

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
  • Remove all the empty commits

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

@backportbot
backportbot Bot requested review from max-nextcloud and mejo- November 4, 2026 21:36
@backportbot backportbot Bot added bug Something isn't working 3. to review AI assisted This PR contains AI-assisted commits labels Nov 4, 2026
@backportbot backportbot Bot added this to the Nextcloud 34.0.6 milestone Nov 4, 2026
mejo- added 3 commits November 4, 2026 22:50
A save request loads the document before checking for outside changes.
If another save by Text finished in between, the file checksum no longer
matched the loaded document and the save was rejected with 409, which
now shows the conflict dialog.

Before reporting a conflict, reload the document and only treat the
change as outside if the stored checksum still differs from the file.
Continue with the reloaded document so the following checks see the
version saved in the meantime.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
The checksum of the saved content was stored only after writing the
document state. A lock or a failure while writing the state left the
previous checksum behind, so every following save was rejected as a
conflict.

Store the checksum right after writing the file.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
The conflict check reads the whole file to compute its checksum, also
for autosaves that are then dropped because the last save was less
than AUTOSAVE_MINIMUM_DELAY seconds ago.

Return early for those autosaves before checking for conflicts. They
do not write anything, so skipping the check cannot overwrite outside
changes. Manual saves are not throttled and are still checked.

Signed-off-by: Jonas <jonas@freesources.org>
Assisted-by: ClaudeCode:claude-opus-5-5
@mejo-
mejo- force-pushed the backport/9542/stable34 branch from 0d06ef5 to b2c6cfe Compare November 4, 2026 22:03
@mejo-
mejo- marked this pull request as ready for review November 4, 2026 22:03
@mejo-
mejo- requested a review from silverkszlo as a code owner November 4, 2026 22:03
@mejo-
mejo- merged commit 25c653c into stable34 Nov 4, 2026
72 checks passed
@mejo-
mejo- deleted the backport/9542/stable34 branch November 4, 2026 22:29
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant