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

Re: [PATCH v2 2/3] fetch-pack: in protocol v2, in_vain only after ACK

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 6, 2020, 21:08 UTC
Message-ID
<nycvar.QRO.7.76.6.2005062304410.56@tvgsbejvaqbjf.bet>
In-Reply-To
<eb18faea2d00d9b09d3fcc79646cc7556023c258.1588031728.git.jonathantanmy@google.com>
Hi Jonathan,
On Mon, 27 Apr 2020, Jonathan Tan wrote:
Show 24 quoted lines
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index baa1a99f45..961cd6beec 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -385,6 +385,24 @@ test_expect_success 'clone shallow with packed refs' '
>  	test_cmp count8.expected count8.actual
>  '
>
> +test_expect_success 'in_vain not triggered before first ACK' '
> +	rm -rf myserver myclient trace &&
> +	git init myserver &&
> +	test_commit -C myserver foo &&
> +	git clone "file://$(pwd)/myserver" myclient &&
> +
> +	# MAX_IN_VAIN is 256. Because of batching, the client will send 496
> +	# (16+32+64+128+256) commits, not 256, before giving up. So create 496
> +	# irrelevant commits.
> +	test_commit_bulk -C myclient 496 &&
> +
> +	# The new commit that the client wants to fetch.
> +	test_commit -C myserver bar &&
> +
> +	GIT_TRACE_PACKET="$(pwd)/trace" git -C myclient fetch --progress origin &&
> +	test_i18ngrep "Total 3 " trace

This just failed in one of the Pipelines I monitor: https://github.com/git-for-windows/git-sdk-64/runs/648253955?check_suite_focus=true

The short of it is:

-- snip -- [...] packet: sideband< \2Enumerating objects: 4, done. packet: sideband< \2Counting objects: 25% (1/4)\15Counting objects: 50% (2/4)\15Counting objects: 75% (3/4)\15Counting objects: 100% (4/4)\15Counting obj packet: sideband< \2ects: 100% (4/4), done.Compressing objects: 50% (1/2)\15Compressing objects: 100% (2/2)\15Compressing objects: 100% (2/2), done.T packet: sideband< \2otal 3 (delta 0), reused 0 (delta 0), pack-reused 0 packet: sideband< PACK ... packet: upload-pack> 0000 packet: sideband< 0000 ++ return 1 error: last command exited with $?=1 t/t5500-fetch-pack.sh:388: error: not ok 43 - in_vain not triggered before first ACK # # rm -rf myserver myclient trace && # git init myserver && # test_commit -C myserver foo && # git clone "file://$(pwd)/myserver" myclient && # # # MAX_IN_VAIN is 256. Because of batching, the client will send 496 # # (16+32+64+128+256) commits, not 256, before giving up. So create 496 # # irrelevant commits. # test_commit_bulk -C myclient 496 && # # # The new commit that the client wants to fetch. # test_commit -C myserver bar && # # GIT_TRACE_PACKET="$(pwd)/trace" git -C myclient fetch --progress origin && # test_i18ngrep "Total 3 " trace -- snap --

In other words, that `test_i18ngrep` assumes incorrectly that "Total 3" will be found in the trace, but the sideband is totally allowed to cut through it and deliver it in different packets.

This makes t5500 flaky.

Ciao, Johannes

Show 10 quoted lines
> +'
> +
>  test_expect_success 'fetch in shallow repo unreachable shallow objects' '
>  	(
>  		git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog &&
> --
> 2.26.2.303.gf8c07b1a785-goog
>
>
>
Previous: Jonathan NiederNext: Jonathan Tan
Message 18 of 25 in “Protocol v2 in_vain fixes”
  1. 0/2 Protocol v2 in_vain fixesJonathan Tan, Apr 25, 2020
  2. 1/2 fetch-pack: in protocol v2, in_vain only after ACKJonathan Tan, Apr 25, 2020
  3. Junio C HamanoApr 25, 2020
  4. Jonathan NiederApr 26, 2020
  5. Jonathan TanApr 27, 2020
  6. Junio C HamanoApr 27, 2020
  7. 2/2 fetch-pack: in protocol v2, reset in_vain upon ACKJonathan Tan, Apr 25, 2020
  8. Jonathan NiederApr 26, 2020
  9. Jonathan TanApr 27, 2020
  10. 0/3 Protocol v2 in_vain fixesJonathan Tan, Apr 28, 2020
  11. 1/3 fetch-pack: return enum from process_acks()Jonathan Tan, Apr 28, 2020
  12. Jonathan NiederApr 28, 2020
  13. Junio C HamanoApr 28, 2020
  14. Michal SuchánekApr 28, 2020
  15. Junio C HamanoApr 28, 2020
  16. 2/3 fetch-pack: in protocol v2, in_vain only after ACKJonathan Tan, Apr 28, 2020
  17. Jonathan NiederApr 28, 2020
  18. Johannes SchindelinMay 6, 2020
  19. t5500: count objects through stderr, not traceJonathan Tan, May 6, 2020
  20. Junio C HamanoMay 6, 2020
  21. Junio C HamanoMay 6, 2020
  22. Johannes SchindelinMay 7, 2020
  23. Johannes SchindelinOct 13, 2020
  24. 3/3 fetch-pack: in protocol v2, reset in_vain upon ACKJonathan Tan, Apr 28, 2020
  25. Jonathan NiederApr 28, 2020

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.