Commit 542d6ee
committed
client: maintain stats correctly when AM detaches/reattaches project
Science United maintains stats (CPU/GPU EC and time, job counts)
for each (host, project) pair.
The client reports these on each AM RPC;
the RPC handler computes the differences and updates things.
Problem: if SU detaches a project on a host,
the project disappears from the host.
If SU later reattaches it, the project will be created with all stats zero.
When this is reported to SU, the previous stats will be lost.
Solution: in the AM RPC reply, for projects not currently on the client
but with a host_project record in the SU database, include the stats;
in the client, parse these in the RPC reply
and use them to initialize the new project.1 parent a8629cf commit 542d6ee
3 files changed
Lines changed: 31 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
| |||
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
| |||
792 | 804 | | |
793 | 805 | | |
794 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
795 | 813 | | |
796 | 814 | | |
797 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | | - | |
196 | | - | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | 320 | | |
325 | 321 | | |
326 | 322 | | |
| |||
0 commit comments