Skip to content

Save the features state and the region digraph atomically. - #3001

Open
RefuX wants to merge 2 commits into
apache:mainfrom
RefuX:atomic-state-save
Open

RefuX wants to merge 2 commits into
apache:mainfrom
RefuX:atomic-state-save

Conversation

@RefuX

@RefuX RefuX commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

A crash or a storage failure during a save could leave state.json or digraph.json truncated. Write each to a temporary file and move it over the original once complete, through a new FileUtils.atomicSave.

@jbonofre
jbonofre self-requested a review October 18, 2026 20:08
Comment thread util/src/main/java/org/apache/karaf/util/FileUtils.java Outdated
Comment thread util/src/main/java/org/apache/karaf/util/FileUtils.java Outdated
@github-actions

Copy link
Copy Markdown

Test Results

  738 files  + 9    738 suites  +9   1h 18m 37s ⏱️ + 2m 52s
1 083 tests + 6    949 ✅ + 6  134 💤 ±0  0 ❌ ±0 
3 249 runs  +18  2 847 ✅ +18  402 💤 ±0  0 ❌ ±0 

Results for commit 267b0e6. ± Comparison against base commit ea2bb7a.

@RefuX

RefuX commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

OK, I think I got everything 👍

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.

2 participants