Repository navigation
Commit bf8cc84
ADFA-4128: record the retained set's invalidation where a read-only dir cannot swallow it
purge() emptied meta.json inside a runCatching and then returned the delete's
result, so a store whose metadata write AND recursive delete both failed left
meta.json intact and readable. load() parsed it and handed a superseded
baseline's bytes to a reconnect re-send - the one thing this store exists not to
do. Emptying the metadata and unlinking it need different permissions, which is
why the class treated them as independent, but a read-only meta.json under a
read-only directory refuses both at once.
The invalidation is now recorded beside the directory when neither half took, and
load() refuses a set carrying that marker. The marker needs only the parent, which
retain() must be able to write anyway to rename its staging dir into place, and it
is cleared as soon as a purge removes the set.
Without the fix the new test reports:
value of: load()
expected: null
but was : RetainedPayload(generation=1, metadataJson={"gen":1}, ...)
Also corrects the purge() KDoc, which claimed a failed delete always leaves the
set unreadable (board task t-jwpRC46uvGrH). It now states the one case that is
still only logged - a store whose whole tree has gone read-only, where there is
nowhere left to record anything - and clear()'s warning no longer asserts an
invalidation it cannot guarantee.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XkGof8cLt23LkxZ8MKzin21 parent 0f6ab44 commit bf8cc84
2 files changed
Lines changed: 61 additions & 7 deletions
File tree
- quickbuild/core/src
- main/java/org/appdevforall/cotg/quickbuild/service/deploy
- test/java/org/appdevforall/cotg/quickbuild/service/deploy
Lines changed: 33 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| |||
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
132 | | - | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
149 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
150 | 164 | | |
151 | 165 | | |
152 | 166 | | |
153 | | - | |
154 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
155 | 170 | | |
156 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
157 | 176 | | |
158 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
159 | 185 | | |
160 | 186 | | |
161 | 187 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
140 | 154 | | |
141 | 155 | | |
142 | 156 | | |
| |||
151 | 165 | | |
152 | 166 | | |
153 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
157 | 184 | | |
| 185 | + | |
158 | 186 | | |
159 | 187 | | |
0 commit comments