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

plugin-ext: stop reading before writing stores #12717

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

paul-marechal
Copy link
Member

The merging of on disk values using deepmerge is bogus.

Instead we'll completely overwrite the file. This should be fine as the PluginsKeyValueStorage singleton is shared across all plugin host processes, meaning there shouldn't be a risk for a race condition to corrupt the file being written on disk.

Note that there is still a race condition risk when multiple Theia backends are running on the same host, but odds should be low.

How to test

Help needed

Review checklist

Reminder for reviewers

The merging of on disk values using `deepmerge` is bogus.

Instead we'll completely overwrite the file. This should be fine as the
`PluginsKeyValueStorage` singleton is shared across all plugin host
processes, meaning there shouldn't be a risk for a race condition
to corrupt the file being written on disk.

Note that there is still a race condition risk when multiple Theia
backends are running on the same host, but odds should be low.
@tsmaeder tsmaeder merged commit c8fb5ad into master Jul 26, 2023
6 checks passed
@github-actions github-actions bot added this to the 1.40.0 milestone Jul 26, 2023
@paul-marechal paul-marechal deleted the mp/plugins-key-value-storage-fix branch July 26, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants