Repository navigation
Commit 5fe5470
committed
fix(checkpoint): flush captured members through update handles on Windows
On native Windows every runtime.checkpoint_artifacts capture and materialize
aborts with EPERM -4048 fsync: copyComponent flushes each copied member
through a read-only handle (open(destination, "r") + sync()), and Windows
FlushFileBuffers requires update access. loopx-project#6415 made the flush read-only so an
ordinary non-root POSIX controller can capture a read-only participant's
0o444 copy, and the flush itself is deliberate (loopx-project#6258). Keep the flush on
every platform: open the staged copy for update, and when the copy is
read-only (POSIX 0o444 mode or the Windows read-only attribute) grant owner
access only for the sync, then restore the reviewed mode before the copy is
witnessed or published. The checkpoint artifact suite gains a read-only
participant case and the established Windows symlink host-privilege guard;
14 of 14 tests pass on native Windows (was 5 of 13).
Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>1 parent 32c882f commit 5fe5470
2 files changed
Lines changed: 47 additions & 8 deletions
File tree
- loopx/control_plane/runtime
- tests/control_plane_ts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
117 | 139 | | |
118 | 140 | | |
119 | 141 | | |
| |||
135 | 157 | | |
136 | 158 | | |
137 | 159 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 160 | + | |
142 | 161 | | |
143 | 162 | | |
144 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
| |||
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | | - | |
94 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
95 | 115 | | |
96 | 116 | | |
97 | 117 | | |
| |||
0 commit comments