fix: extend atomic writes to all config file saves#2461
Open
dirkwa wants to merge 7 commits intoSignalK:masterfrom
Open
fix: extend atomic writes to all config file saves#2461dirkwa wants to merge 7 commits intoSignalK:masterfrom
dirkwa wants to merge 7 commits intoSignalK:masterfrom
Conversation
Prevents plugin configuration files from being truncated if the disk is full or write is interrupted (e.g. power loss). Refs SignalK#1702
Prevents security.json (ACLs, users, permissions) from being truncated on disk-full or interrupted write. Refs SignalK#1702
Prevents server state files from being truncated on disk-full or interrupted write. Refs SignalK#1702
Prevents unit preference config, custom definitions, custom categories, and preset files from being truncated on disk-full or interrupted write. Refs SignalK#1702
Prevents WASM plugin configuration from being truncated on disk-full or interrupted write. Refs SignalK#1702
Prevents WASM plugin config saved via the sk_save_config host binding from being truncated on disk-full or interrupted write. Refs SignalK#1702
Prevents the persisted debug settings file from being truncated on disk-full or interrupted write. Refs SignalK#1702
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Disk-full or interrupted writes can truncate config files. PR #2227 introduced
atomicWrite(write-to-tmp-then-rename) for core config files, but several other save paths were missed.This extends atomic writes to all remaining config file writes:
plugin-config-data/*.json)security.json)Each change is an isolated commit for easy review or cherry-picking.
Refs #1702