git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] Write commit-graph on fetch
@ 2019-09-03  2:22 Derrick Stolee via GitGitGadget
  2019-09-03  2:22 ` [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting Derrick Stolee via GitGitGadget
  0 siblings, 1 reply; 18+ messages in thread
From: Derrick Stolee via GitGitGadget @ 2019-09-03  2:22 UTC (permalink / raw)
  To: git; +Cc: peff, avarab, garimasigit, Junio C Hamano

Instead of waiting for a non-trivial GC command to write the commit-graph,
write one during 'git fetch'. By using the equivalent method for 'git
commit-graph write --split --reachable', we create a commit-graph chain that
includes all reachable commits. Most of the time, these writes only add the
newly-downloaded commits in a small file at the top of the commit-graph
chain. Commits that are no longer reachable still exist in the commit-graph,
but will be cleaned up by a later GC command that forces the commit-graph to
be rewritten completely.

A version of this patch [1] used to be a part of
ds/commit-graph-incremental, but was removed to focus on the incremental
commit-graph file format. Now that the incremental file format has been
shipped in v2.23.0 and some config things have adjusted in
ds/feature-macros, I'm reintroducing the idea.

Ævar had mentioned wanting to do something with "incremental maintenance
during GC" [2]. I haven't seen any patches towards that aim (please point me
in that direction if they have been submitted). I still think it is worth
allowing a write at fetch time, as some users have GC disabled. I know for
sure that users who only interact with their Git repos via Visual Studio
Team Explorer have all Git commands running with GC disabled, and likely
other desktop GUI clients have it disabled to avoid blocking processes.

Aside: VFS for Git users have GC disabled, but the commit-graph is being
written in the background by a monitoring process. We shipped the
incremental commit-graph writes in a recent version and reduced our writes
from ~60 seconds each to less than a second on average. Very rarely, the
layers of the commit-graph chain collapse and return to the old values. This
feature has been performing well with no known issues.

Thanks, -Stolee

[1] 
https://public-inbox.org/git/3c52385e5696887c40cab4a6b9b7923d60a0567c.1557330827.git.gitgitgadget@gmail.com/

[2] 
https://public-inbox.org/git/b1de6af2-c015-098e-a656-e1b68056e037@gmail.com/

Derrick Stolee (1):
  fetch: add fetch.writeCommitGraph config setting

 Documentation/config/feature.txt |  8 ++++++++
 Documentation/config/fetch.txt   | 10 ++++++++++
 builtin/fetch.c                  | 15 +++++++++++++++
 repo-settings.c                  |  4 ++++
 repository.h                     |  1 +
 t/t5510-fetch.sh                 | 13 +++++++++++++
 6 files changed, 51 insertions(+)


base-commit: aaf633c2ad10b47af7623c130ddfe7231658c7e4
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-328%2Fderrickstolee%2Ffetch-write-commit-graph-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-328/derrickstolee/fetch-write-commit-graph-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/328
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-09-09 17:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03  2:22 [PATCH 0/1] Write commit-graph on fetch Derrick Stolee via GitGitGadget
2019-09-03  2:22 ` [PATCH 1/1] fetch: add fetch.writeCommitGraph config setting Derrick Stolee via GitGitGadget
2019-09-03 19:05   ` Junio C Hamano
2019-09-03 23:36     ` Derrick Stolee
2019-09-06 21:46       ` Junio C Hamano
2019-09-07  4:51         ` Jeff King
2019-09-09 17:53           ` Junio C Hamano
2019-09-04  3:08   ` Jeff King
2019-09-05 20:37     ` Junio C Hamano
2019-09-06 17:00       ` Derrick Stolee
2019-09-06 17:56         ` Jeff King
2019-09-06 18:24           ` Junio C Hamano
2019-09-06 19:16             ` Jeff King
2019-09-06 20:42               ` Junio C Hamano
2019-09-06 21:04                 ` Derrick Stolee
2019-09-06 21:57                   ` Junio C Hamano
2019-09-07  4:47                     ` Jeff King
2019-09-07  4:46                   ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).