Commit 6a0bf98
lfs_server: gate upstream batch_download fetch behind a JustKnob
Summary:
Adds `scm/mononoke:lfs_server_skip_upstream_for_downloads`, a per-repo JustKnob that, when enabled, makes `batch_download` skip the upstream LFS server entirely. Only the internal Filestore is consulted; objects that exist solely upstream are reported as 404 to the client. Upload paths (`batch_upload`, `upload_from_client`, `sync_internal_and_upstream`) are unaffected and still propagate uploads to upstream.
The motivation is to support repos where new content has stopped being mirrored upstream: clients should still write through to upstream so the mirror stays in sync, but downloads should not depend on or wait for upstream.
The existing knob `repo_config().lfs.use_upstream_lfs_server` is all-or-nothing — disabling it removes upstream from both directions. The new JK is download-only and switchable per-repo (via `switchval = repo_name`) so the change can be canaried instead of flipped globally.
Default in `just_knobs.json` is `false`, preserving existing behavior.
Reviewed By: YousefSalama
Differential Revision: D104026975
fbshipit-source-id: d82f01df50da3a5adb4e618668f029a16fb49a5f1 parent 21a6228 commit 6a0bf98
2 files changed
Lines changed: 73 additions & 0 deletions
File tree
- eden/mononoke
- common/mononoke_macros/just_knobs_defaults
- servers/lfs/lfs_server/src
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
| |||
566 | 574 | | |
567 | 575 | | |
568 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
569 | 596 | | |
570 | 597 | | |
571 | 598 | | |
| |||
1207 | 1234 | | |
1208 | 1235 | | |
1209 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1210 | 1282 | | |
0 commit comments