git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: p2000 failure due to empty reflog

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 6, 2021, 16:59 UTC
Message-ID
<xmqqsfxersvy.fsf@gitster.g>
In-Reply-To
<581663a7-9b16-e464-ada7-368f20c99ff1@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 6 quoted lines
> Good point.  I have gc.auto=0 in my config, but the tests use their own,
> empty config.  A trace shows that "git gc --auto --no-quiet" is started.
> The following patch turns that off and allows the tests to succeed.
>
> Not doing maintenance in parallel to a performance test is a good idea
> anyway,

Sounds like a sensible analysis, and I agree that it is a good idea to by default disable the maintenance tasks in t/perf (possibly at a more centralized place).

Show 33 quoted lines
> but I still don't understand why it would empty the reflog --
> that seems excessive, dangerous even.
>
> One of the maintenance commands from the trace is "git reflog expire
> --all".  If I put that in before the "checkout -" test (on top of the
> patch below) then the reflog is emptied again and the test fails.
>
> René
>
> ---
>  t/perf/p2000-sparse-operations.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/t/perf/p2000-sparse-operations.sh b/t/perf/p2000-sparse-operations.sh
> index 597626276f..9a06904247 100755
> --- a/t/perf/p2000-sparse-operations.sh
> +++ b/t/perf/p2000-sparse-operations.sh
> @@ -105,6 +105,13 @@ test_perf_on_all () {
>  	done
>  }
>
> +test_expect_success 'disable housekeeping' '
> +	for repo in full-v3 full-v4 sparse-v3 sparse-v4
> +	do
> +		git -C $repo config gc.auto 0
> +	done
> +'
> +
>  test_perf_on_all git status
>  test_perf_on_all git add -A
>  test_perf_on_all git add .
> --
> 2.33.0
Previous: René ScharfeNext: René Scharfe
Message 4 of 10 in “p2000 failure due to empty reflog”
  1. René ScharfeOct 2, 2021
  2. Derrick StoleeOct 4, 2021
  3. René ScharfeOct 5, 2021
  4. Junio C HamanoOct 6, 2021
  5. perf: disable automatic housekeepingRené Scharfe, Oct 9, 2021
  6. "git reflog expire" blindly trusting timestamps in reflogsÆvar Arnfjörð Bjarmason, Oct 9, 2021
  7. Junio C HamanoOct 9, 2021
  8. Jeff KingOct 11, 2021
  9. Ævar Arnfjörð BjarmasonOct 5, 2021
  10. René ScharfeOct 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.