diff options
author | Colin Walters <walters@verbum.org> | 2021-12-06 08:19:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 08:19:12 -0500 |
commit | a07b8d6c0076d424555c37b6fa462ce279b831c0 (patch) | |
tree | b6464ca6f1215542f8e7b4311d69d62096e75482 | |
parent | 267ca93da28e00adb3f961d208821bba4644a2d4 (diff) | |
parent | 2c39bd88a9b0db207c1158c76bbbe0b484dec9dd (diff) | |
download | ostree-a07b8d6c0076d424555c37b6fa462ce279b831c0.tar.gz |
Merge pull request #2493 from cgwalters/summary-lock-shared
repo: Change locking for summary regeneration to be shared
-rw-r--r-- | src/libostree/ostree-repo.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 74cea37f..a9be9f94 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -6105,7 +6105,7 @@ summary_add_ref_entry (OstreeRepo *self, * and refs in %OSTREE_SUMMARY_COLLECTION_MAP are guaranteed to be in * lexicographic order. * - * Locking: exclusive + * Locking: shared (Prior to 2021.7, this was exclusive) */ gboolean ostree_repo_regenerate_summary (OstreeRepo *self, @@ -6113,16 +6113,10 @@ ostree_repo_regenerate_summary (OstreeRepo *self, GCancellable *cancellable, GError **error) { - /* Take an exclusive lock. This makes sure the commits and deltas don't get - * deleted while generating the summary. It also means we can be sure refs - * won't be created/updated/deleted during the operation, without having to - * add exclusive locks to those operations which would prevent concurrent - * commits from working. - */ g_autoptr(OstreeRepoAutoLock) lock = NULL; gboolean no_deltas_in_summary = FALSE; - lock = ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_EXCLUSIVE, + lock = ostree_repo_auto_lock_push (self, OSTREE_REPO_LOCK_SHARED, cancellable, error); if (!lock) return FALSE; |