Reduce server stalls during backup preparation - #345
Merged
Merged
Conversation
Read BQ migration backups and AE2 spawn data on the archive worker while world saving is suspended. Join the worker before mod shutdown saves; keep live data and filesystem links captured.
Use the JDK file-tree walker for unfiltered scans to avoid redundant file attribute queries on Windows. Preserve glob traversal, link handling, and backup-storage exclusion.
Keep immediate retries for backup and shutdown saves. Consolidate backup timings into one server-thread summary and remove temporary snapshot diagnostics.
NTFS enumeration can report stale sizes while writers remain open. Read the size from the input channel and retain exact-length, CRC, and cancellation checks.
boubou19
approved these changes
Sep 20, 2026
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.
Summary
The file snapshot introduced in #343 ended up causing a bit of extra stalls on server thread during backups.
This PR reduce snapshot overhead while retaining the extra safeties we added.
Instead of copying thousands of files individually, backup preparation collects mutable data into one temporary file and avoids unnecessary filesystem calls.
Some known stable files are also read by the backup worker instead.
Local measurements
Measurement done on a local save. duration of backup task in milliseconds.
Checklist