Survive a power loss right after a snapshot or switch: flush git writes and repair a damaged index #163
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ethan-hann/SavePoint#163
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by a resilience review (report kept by the maintainer). RepoConfigFile.cs:104-119 sets no core.fsync, so the index, refs and loose objects (saves are small files, stored loose) are not flushed. With bundled git 2.56.0.windows.2, an emptied index makes every command fail with "index file smaller than expected" (exit 128), and SavePoint has no repair path; every snapshot, switch and discard for that game then fails. Fix: add core.fsync=committed,index and core.fsyncMethod=batch to the managed config and bump the config stamp (as D47/D50 did), measuring the capture-time cost on a mid-range PC; map index-damage errors to a typed error and repair with read-tree HEAD under the game lock (changes no game file).
Shipped in 0.9.15 (pull request 174).