Skip to content

fix(file-provider): Make change batch delivery idempotent - #10822

Merged
claucambra merged 5 commits into
masterfrom
work/idempotency-change-batch-fp
Sep 17, 2026
Merged

claucambra merged 5 commits into
masterfrom
work/idempotency-change-batch-fp

Conversation

@claucambra

@claucambra claucambra commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Resolves

Possible explanation for #10647

Summary

The current change delivery batch design is not idempotent. In practice this means that it is possible for change delivery batches to not be correctly processed by the sync engine, causing certain changes to not be correctly delivered to the File Provider framework.

Specifically, the current design automatically advances the change delivery state before said change batch is delivered to the File Provider framework; if the File Provider extension process is closed/crashes before the File Provider framework has processed the batch, this same batch will never be provided again to the framework and will be skipped, preventing certain changes from being delivered.

This PR addresses this by only advancing the change delivery state once the current batch is recognised as processed by the File Provider framework

Checklist

AI (if applicable)

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
…nge delivery acknowledgement

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Only modify change delivery state (next sequence, current anchor key, queued delivery items, deletion cleanup) once change delivery batch is confirmed acknowledged by the file provider framework

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra added this to the 34.0.5 milestone Sep 14, 2026
@claucambra claucambra self-assigned this Sep 14, 2026
@claucambra claucambra added the os: 🍎 macOS Apple macOS, formerly also known as OS X label Sep 14, 2026
@claucambra claucambra added the feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. label Sep 14, 2026
@claucambra

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.0

@sonarqubecloud

Copy link
Copy Markdown

@claucambra
claucambra merged commit 368d077 into master Sep 17, 2026
26 of 27 checks passed
@claucambra
claucambra deleted the work/idempotency-change-batch-fp branch September 17, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants