Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Siddh Raman Pant <siddh.raman.pant@oracle.com>,
	 "git@vger.kernel.org" <git@vger.kernel.org>,
	 "newren@gmail.com" <newren@gmail.com>, "ps@pks.im" <ps@pks.im>,
	 "oswald.buddenhagen@gmx.de" <oswald.buddenhagen@gmx.de>,
	 "code@khaugsbakk.name" <code@khaugsbakk.name>
Subject: Re: [PATCH 4/9] run-command: add support for timeout in command finisher
Date: Fri, 22 May 2026 09:10:47 +0900	[thread overview]
Message-ID: <xmqqv7cgxq0o.fsf@gitster.g> (raw)
In-Reply-To: <cf52154c-1275-4a4b-957e-5aa17f22705c@kdbg.org> (Johannes Sixt's message of "Thu, 21 May 2026 16:36:05 +0200")

Johannes Sixt <j6t@kdbg.org> writes:

> Am 21.05.26 um 11:59 schrieb Siddh Raman Pant:
>> The timeout is for the failure path, where the external helper has
>> already stopped following that protocol or is blocked on something
>> outside git's control. Since git starts the helper and puts it on the
>> log/grep path, git also needs a bounded way to recover when that helper
>> does not make progress. Otherwise an optional note source can prevent
>> the main git command from completing.
>
> That Git communicates with a process that looks like it stopped is the
> normal case, for example:
>
> - Output is sent to the pager. The user can take their time to study the
> output. All the while, git waits patiently for the user to advance the
> pager.
>
> - Git fetch transfers large amounts of data across the network. Most of
> the time it waits for data to arrive and does nothing. The peer process
> looks like it hangs. Git does not decide to kill the connection at any
> time. It is the user's decision to do so.
>
> If the notes provider hangs, then it is not on Git to decide when it has
> waited long enough.

It is often the sticking sore point that there is no good timeout
value that suites for everybody.

If a protocol builds its own way to declare "this backend is slow,
so please do not consider less than 3 seconds of nonaction something
to worry about but kill it off if you waited more than that" to make
the receiving/waiting end responsible for managing timeout, that
might be workable, but it certainly feels like a kludge.  The
protocol can instead allow an "error - for your particular request,
we couldn't come up with an answer within a reasonable time limit"
response (in practice, "within time limit" does not have to be the
only reason for such an error) to be returned, I think.





  reply	other threads:[~2026-05-22  0:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 16:30 [PATCH 0/9] Add support for an external command for fetching notes Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 1/9] Documentation/git-range-diff: add missing notes options in synopsis Siddh Raman Pant
2026-05-19 23:47   ` Junio C Hamano
2026-05-20  7:00     ` Siddh Raman Pant
2026-05-21  0:28       ` Junio C Hamano
2026-05-21  4:13         ` Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 2/9] notes: convert raw arg in format_display_notes() to bool Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 3/9] wrapper: add sleep_nanosec Siddh Raman Pant
2026-05-19 23:50   ` Junio C Hamano
2026-05-20  7:07     ` Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 4/9] run-command: add support for timeout in command finisher Siddh Raman Pant
2026-05-21  7:21   ` Johannes Sixt
2026-05-21  8:39     ` Oswald Buddenhagen
2026-05-21  9:59     ` Siddh Raman Pant
2026-05-21 14:36       ` Johannes Sixt
2026-05-22  0:10         ` Junio C Hamano [this message]
2026-05-22  5:46           ` Siddh Raman Pant
2026-05-22  5:10         ` Jeff King
2026-05-22  5:59           ` Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 5/9] wrapper: add support for timeout and deadline in read helpers Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 6/9] t3301: cover generic displayed notes behavior Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 7/9] notes: support an external command to display notes Siddh Raman Pant
2026-05-20  0:03   ` Junio C Hamano
2026-05-20  6:59     ` Siddh Raman Pant
2026-05-21  1:12   ` brian m. carlson
2026-05-21  4:12     ` Siddh Raman Pant
2026-05-21 21:18       ` brian m. carlson
2026-05-19 16:30 ` [PATCH 8/9] Documentation: document external notes command options Siddh Raman Pant
2026-05-19 16:30 ` [PATCH 9/9] t: add tests for external notes command Siddh Raman Pant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqv7cgxq0o.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=newren@gmail.com \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=ps@pks.im \
    --cc=siddh.raman.pant@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox