Commit 8683da9
Implement combined cache in
Previously, combined cache is implemented by `DiskAndRemoteCacheCliet` which is hidden behind the interface `RemoteCacheClient`. This introduced a lot of issues because disk cache is really not a variant of remote cache and we need to handle them differently.
This CL moves the logic from `DiskAndRemoteCacheCliet` to `RemoteCache` so that the code is aware of two caches and:
1. `casUploadCache` is only applied to remote cache.
2. Every functions in `RemoteExecutionCache` only operates remote cache.
The class `RemoteCache` should really be renamed to something else because it doesn't only have remote cache. But this should be a follow-up CL.
Fixes bazelbuild#20962.
Closes bazelbuild#21213.
It's also releated to bazelbuild#20296, but I would like the add the mentioned integration test before close it.
PiperOrigin-RevId: 671740437
Change-Id: Ia55ef879d313d111874b4f8376f66a7d1fceebf7RemoteCache.1 parent 4f89f43 commit 8683da9
File tree
23 files changed
+471
-482
lines changed- src
- main/java/com/google/devtools/build/lib/remote
- disk
- test
- java/com/google/devtools/build/lib/remote
- util
- shell/bazel/remote
- tools/remote/src/main/java/com/google/devtools/build/remote/worker
23 files changed
+471
-482
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
Lines changed: 254 additions & 34 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
56 | 45 | | |
57 | | - | |
| 46 | + | |
58 | 47 | | |
59 | 48 | | |
60 | 49 | | |
| |||
64 | 53 | | |
65 | 54 | | |
66 | 55 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 56 | + | |
| 57 | + | |
77 | 58 | | |
78 | | - | |
| 59 | + | |
79 | 60 | | |
80 | 61 | | |
81 | | - | |
82 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
83 | 74 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 75 | + | |
87 | 76 | | |
88 | 77 | | |
89 | 78 | | |
| |||
137 | 126 | | |
138 | 127 | | |
139 | 128 | | |
140 | | - | |
| 129 | + | |
141 | 130 | | |
142 | 131 | | |
143 | 132 | | |
| |||
149 | 138 | | |
150 | 139 | | |
151 | 140 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 141 | | |
172 | 142 | | |
173 | 143 | | |
| |||
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
103 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
175 | 180 | | |
176 | 181 | | |
177 | 182 | | |
178 | | - | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | | - | |
| 189 | + | |
185 | 190 | | |
186 | 191 | | |
187 | 192 | | |
| |||
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
199 | | - | |
| 204 | + | |
200 | 205 | | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
204 | | - | |
| 209 | + | |
205 | 210 | | |
206 | 211 | | |
207 | 212 | | |
| |||
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
318 | | - | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
| |||
Lines changed: 14 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
289 | | - | |
290 | | - | |
| 288 | + | |
| 289 | + | |
291 | 290 | | |
292 | 291 | | |
293 | | - | |
294 | | - | |
| 292 | + | |
| 293 | + | |
295 | 294 | | |
296 | 295 | | |
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | 299 | | |
301 | 300 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
316 | 304 | | |
317 | 305 | | |
318 | 306 | | |
| |||
322 | 310 | | |
323 | 311 | | |
324 | 312 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
341 | 318 | | |
342 | 319 | | |
343 | 320 | | |
| |||
1310 | 1287 | | |
1311 | 1288 | | |
1312 | 1289 | | |
1313 | | - | |
| 1290 | + | |
1314 | 1291 | | |
1315 | 1292 | | |
1316 | 1293 | | |
| |||
1583 | 1560 | | |
1584 | 1561 | | |
1585 | 1562 | | |
1586 | | - | |
| 1563 | + | |
1587 | 1564 | | |
1588 | 1565 | | |
1589 | 1566 | | |
| |||
0 commit comments