aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-01-18 13:33:59 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-01-18 13:46:29 -0500
commit46fe21d7e210404a1f9a9291c0d637245bfa0c9f (patch)
tree89d8c4df1b5d427e19ef9f5fca3505856d30dcc9
parent819b61275f9bbe5b5497f9355678b1bebb8076e2 (diff)
downloadgrokmirror-46fe21d7e210404a1f9a9291c0d637245bfa0c9f.tar.gz
Use plumbing when fetching objstore during fsck
The only place where we'll use plumbing for fetching objects into objstore repos is when we realize that the child repo is out of sync with its virtual ref. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgrokmirror/fsck.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py
index b51e69a..8414693 100755
--- a/grokmirror/fsck.py
+++ b/grokmirror/fsck.py
@@ -1000,6 +1000,7 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False,
analyzed = 0
queued = 0
logger.info('Analyzing %s (%s repos)', obstdir, len(obstrepos))
+ objstore_uses_plumbing = config['core'].getboolean('objstore_uses_plumbing', False)
islandcores = [x.strip() for x in config['fsck'].get('islandcores', '').split('\n')]
stattime = time.time()
for obstrepo in obstrepos:
@@ -1081,8 +1082,10 @@ def fsck_mirror(config, force=False, repack_only=False, conn_only=False,
gitdir = '/' + os.path.relpath(childpath, toplevel)
if fetch:
+ grokmirror.lock_repo(obstrepo, nonblocking=False)
logger.info(' fetch: %s -> %s', gitdir, os.path.basename(obstrepo))
- grokmirror.fetch_objstore_repo(obstrepo, childpath)
+ grokmirror.fetch_objstore_repo(obstrepo, childpath, use_plumbing=objstore_uses_plumbing)
+ grokmirror.unlock_repo(obstrepo)
if gitdir not in manifest:
continue