Skip to content

Conversation

@max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Sep 29, 2025

See #7692 .

In the save request the client sends:

  • the serialized content of the document (maybe plus local edits that were not synced yet).
  • the document state according to the steps it received until that point
  • the version (i.e. id) of the last step it has received from the server ($version)

$stepsVersion is the latest version the server has seen until now.

lastSavedVersion should be $version - i.e. the version the client has processed
at the time it initiated the save request.

Otherwise when loading the document
or attempting to recover from missing steps
the steps between $version and $stepsVersion will be left out.

Network captures

Left is client that saved, right is client that was sending changes constantly.
Left client saved with "version":14830451. Document is saved with lastSavedVersion set to 14830508.

image

Impact

While this does explain why the client could not recover from missing a step it does not explain why it did not process the step it received in the first place.

The client sends a serialized version of the document
plus the document state
according to the steps it received until that point
(maybe plus local edits that were not synced yet).

lastSavedVersion should be the version the client had seen
at the time it initiated the save request
not the last version of any step the server saw
when receiving the request.

Otherwise when loading the document
or attempting to recover from missing steps
the steps in between will be left out.

Signed-off-by: Max <[email protected]>
@mejo-
Copy link
Member

mejo- commented Sep 29, 2025

/backport to stable32

@mejo-
Copy link
Member

mejo- commented Sep 29, 2025

/backport to stable31

@mejo- mejo- merged commit 69065e5 into main Sep 29, 2025
66 of 71 checks passed
@mejo- mejo- deleted the fix/save-actual-version branch September 29, 2025 15:09
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.

3 participants