Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5af2ad2
fix(autosave): every time the typing stops
max-nextcloud Jul 14, 2026
92b4d3b
chore(refactor): document tracking into provideSyncService
max-nextcloud Jul 25, 2026
e6db181
fix(autosave): only save when server is ready
max-nextcloud Jul 25, 2026
307525f
fix(autosave): better dirty tracking with versions
max-nextcloud Jul 26, 2026
400b5f0
chore(refactor): Save service with its own bus
max-nextcloud Jul 27, 2026
f486f45
chore(refactor): separate SaveService from SyncService and ydoc
max-nextcloud Jul 27, 2026
8034752
fix(autosave): exponential delay for retries on error
max-nextcloud Jul 27, 2026
daa0da3
fix(autosave): retry if server throttled save request
max-nextcloud Jul 27, 2026
b3c1947
fix(autosave): handle out of sync clocks
max-nextcloud Jul 27, 2026
9b82fc3
chore(test): always retry autosave after 10 seconds
max-nextcloud Jul 28, 2026
b38901e
fix(indexed-db): rely on autosave when recovering
max-nextcloud Jul 28, 2026
42e53fe
chore(CI): playwright test timeout 45 seconds
max-nextcloud Jul 28, 2026
7bf6cbc
chore(test): mtime is optional in upload file fixture
max-nextcloud Jul 28, 2026
91db677
fix(autosave): throttle to SERVER_AUTOSAVE_INTERVAL
max-nextcloud Jul 29, 2026
79eceb1
chore(tests): fix autosave test with new timing
max-nextcloud Jul 29, 2026
983edba
chore(lint): fix tsc, prettier and linter after backport
max-nextcloud Aug 4, 2026
a1d5f7d
chore(deps): update dependency cypress to ^15.19.0
mejo- Aug 5, 2026
9bf5484
fix(save): extend ttl for document save lock to 1 Minute
max-nextcloud Sep 1, 2026
b100aa0
fix(save): autosave only every ten seconds
max-nextcloud Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/Service/DocumentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ public function autosave(Document $document, File $file, int $version, string $a

$this->assertNoOutsideConflict($document, $file, $force);

// Abort autosave if already saving.
if ($this->cache->get('document-save-lock-' . $documentId) && $manualSave === false) {
return $document;
}

// Do not save if newer version already saved
// Note that $version is the version of the steps the client has fetched.
// It may have added steps on top of that - so if the versions match we still save.
Expand Down Expand Up @@ -404,7 +409,7 @@ public function autosave(Document $document, File $file, int $version, string $a
return $document;
}

$this->cache->set('document-save-lock-' . $documentId, true, 10);
$this->cache->set('document-save-lock-' . $documentId, true, 60);
try {
$this->lockManager->runInScope(new LockContext(
$file,
Expand Down
Loading
Loading