Repository navigation
[stable34] fix(sync): improve situation around false conflicts - #9551
Merged
Merged
Conversation
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-
force-pushed
the
backport/9542/stable34
branch
from
November 4, 2026 22:03
0d06ef5 to
b2c6cfe
Compare
mejo-
marked this pull request as ready for review
November 4, 2026 22:03
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 #9542
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.