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

Re: [PATCH] fetch-pack: write effective filter to trace2

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2022, 15:53 UTC
Message-ID
<xmqqr12is9gp.fsf@gitster.g>
In-Reply-To
<de8d38fc-23e3-b876-87e8-7b4193bff44c@jeffhostetler.com>
Jeff Hostetler <git@jeffhostetler.com> writes:
Show 6 quoted lines
> Yeah, the use of "none" gave me pause, but I didn't have a better idea
> at the time.  I guess we have:
> (a) requested, supported, used.
> (b) "none used because the server doesn't support it" and
> (c) "none used because the user didn't request it" cases,
> right?

At these sites where the new traces are added, we cannot detect the remaining case (d) "requested by the user, asked for the server, but the server dropped the ball", I think the above covers the possible cases that are interesting to us entirely.

Show 20 quoted lines
> Perhaps it would be better to do:
>     if (server_supports_filtering && args->filter_options.choice)
>         trace2_data_string("fetch", r, "filter/effective", spec);
>     else
>         trace2_data_string("fetch", r, "filter/unsupported", spec);
>
> Using two different keywords.
>
> So that the log only contains "filter/effective" when it was actually
> used.  And there is no "filter/effective" event when (for whatever
> reason) it was not in effect.
>
> Then the "filter/unsupported" event helps you with debugging.  Did they
> hit a server that doesn't support filtering or did they have a typo in
> their filter spec?
>
> Then don't emit a message at all for the "not requested" case.  And you
> can use the Git version number to know how to interpret it.  There are
> other places where we don't bother sending messages where the value is
> a zero or empty.

Sounds alright. We could standardize the other way, which might make the interpretation of individual trace entries independent of the context easier, though.

Thanks.
Previous: Jeff HostetlerNext: Jonathan Tan
Message 8 of 15 in “fetch-pack: write effective filter to trace2”
  1. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 15, 2022
  2. Jeff HostetlerJul 15, 2022
  3. Junio C HamanoJul 15, 2022
  4. Jonathan TanJul 15, 2022
  5. Junio C HamanoJul 15, 2022
  6. Jonathan TanJul 15, 2022
  7. Jeff HostetlerJul 18, 2022
  8. Junio C HamanoJul 18, 2022
  9. Jonathan TanJul 18, 2022
  10. Junio C HamanoJul 18, 2022
  11. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 18, 2022
  12. Junio C HamanoJul 18, 2022
  13. Junio C HamanoJul 25, 2022
  14. Jonathan TanJul 26, 2022
  15. fetch-pack: write effective filter to trace2Jonathan Tan, Jul 26, 2022

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.