Repository navigation
Commit a75f05c
committed
fix(file-safety): open the copied target with write access before fsync
Windows FlushFileBuffers requires GENERIC_WRITE on the handle, so the
copy-fallback flush opened with "r" can fail the flush and report a
false PostCommitDurabilityError on bytes that are already published -
a later create attempt then sees the published target as a conflict.
Open "r+", matching the existing backup fsync path; the invocation-order
pin asserts the write-access flag (NC: reverting to "r" reddens exactly
that test). 68/68 green.1 parent 0c70f6d commit a75f05c
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1188 | 1188 | | |
1189 | 1189 | | |
1190 | 1190 | | |
1191 | | - | |
1192 | | - | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1193 | 1196 | | |
1194 | 1197 | | |
1195 | 1198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
666 | 670 | | |
667 | | - | |
| 671 | + | |
668 | 672 | | |
669 | 673 | | |
670 | 674 | | |
| |||
0 commit comments