Repository navigation
Introduce concept of enforced atomic operations (fix #193151) - #193228
Conversation
…to FileUserDataProvider
There was a problem hiding this comment.
LGTM except one code style issue.
I leave it up to Sandeep Somavarapu (@sandy081) to comment on the impact of this change. I think the idea of this provider was to explicitly enforce atomic writes on the level of the file system provider for all user data files (except backups). With your change, we now rely on the file service to use writeFile for this to happen. But writeFile is used only in specific conditions, for example when the file is small (3 * 64kb I believe) or when a file is changed not through an editor that has a ITextSnapshot but programmatically where the entire buffer is passed in (which I believe is most often the case with user data).
Co-authored-by: Benjamin Pasero <[email protected]>
Benjamin Pasero (@bpasero) Is it also true if programmatic save goes through |
|
Sandeep Somavarapu (@sandy081) no. But I think a better solution is to stop overriding the file system provider and do what I had suggested in #193151 (comment) |
|
In this case, I would not suggest this change. It is important to have atomic write for user data like settings and extensions. |
|
This is ready for review. |
Sandeep Somavarapu (sandy081)
left a comment
There was a problem hiding this comment.
Good change. I liked it.
Sandeep Somavarapu (sandy081)
left a comment
There was a problem hiding this comment.
Good change. I liked it.
The only two file system providers being passed to
FileUserDataProvideris either the disk one or the in memory one. The former already supportsIFileSystemProviderWithOpenReadWriteCloseCapabilitythus in this PR we added the capability to the in memory file system provider