Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a source of VFS inconsistency #4253

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Fix a source of VFS inconsistency #4253

merged 1 commit into from
Dec 6, 2023

Conversation

nono
Copy link
Member

@nono nono commented Dec 6, 2023

When a new file is uploaded, and the stack tries to save the io.cozy.files in CouchDB, it may happen that an error occurs and the stack doesn't know if the document has been saved or not in CouchDB (timeout, network issue, CouchDB unavailable). In that case, it is safer to try to delete the document in CouchDB.

It is not perfect. For example, if CouchDB has accepted the document just before becoming unavailable, the deletion will fail (CouchDB unavailable), and it will still have an inconsistency. But, at least, it should reduce the number of cases.

When a new file is uploaded, and the stack tries to save the
io.cozy.files in CouchDB, it may happen that an error occurs and the
stack doesn't know if the document has been saved or not in CouchDB
(timeout, network issue, CouchDB unavailable). In that case, it is safer
to try to delete the document in CouchDB.

It is not perfect. For example, if CouchDB has accepted the document
just before becoming unavailable, the deletion will fail (CouchDB
unavailable), and it will still have an inconsistency. But, at least, it
should reduce the number of cases.
@nono nono requested a review from a team as a code owner December 6, 2023 10:19
@nono nono merged commit c830181 into master Dec 6, 2023
6 checks passed
@nono nono deleted the fix-vfs-timeout branch December 6, 2023 11:15
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.

None yet

2 participants