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

Re: [PATCH v3 1/1] trace2: write to directory targets

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 24, 2019, 14:51 UTC
Message-ID
<87a7hkcome.fsf@evledraar.gmail.com>
In-Reply-To
<xmqqlg14pi2x.fsf@gitster-ct.c.googlers.com>
On Sun, Mar 24 2019, Junio C Hamano wrote:
Show 10 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> The reason I'm raising this is that it seems like sweeping an existing
>> issue under the rug. We document that the "sid" is "unique", and it's just:
>>
>>     <nanotime / 1000 (i.e. *nix time in microseconds)>-<pid>
>
> If it is just that, then it cannot be unique, can it?
>
> Let's just fix the wrong doc and move on.

I don't see why we wouldn't just fix the SID generation & move on if we're already carrying code purely as a work-around for it not being unique enough.

Of course nothing is *guaranteed* to be unique, not even a 128-bit UUID. The point is to pick something that's "unique enough" given the problem space, which is already one where we'll ignore I/O errors on writing the file unless you opt-in to a warning.

And it's a very useful property to have the SID be a) unique enough like that so you can use a unique index for "git events" b) fixed-width (which the current one *isn't*), so you can use fixed-with indexes in some logging databases c) as a bonus, be human-readable at a glance, hence spending slightly more space on the the YYYMM.. format in my suggested SID format.

I can write that patch, but first it's useful to know if this is a case Josh is running into, or if it's just a guard out of paranoia.

Previous: Junio C HamanoNext: Junio C Hamano
Message 29 of 34 in “Randomize / timestamp trace2 targets”
  1. 0/2 Randomize / timestamp trace2 targetsJosh Steadmon, Mar 13, 2019
  2. 1/2 date: make get_time() publicJosh Steadmon, Mar 13, 2019
  3. 2/2 trace2: randomize/timestamp trace2 targetsJosh Steadmon, Mar 13, 2019
  4. Ævar Arnfjörð BjarmasonMar 13, 2019
  5. Jeff HostetlerMar 15, 2019
  6. Ævar Arnfjörð BjarmasonMar 15, 2019
  7. Jeff HostetlerMar 15, 2019
  8. Josh SteadmonMar 15, 2019
  9. Josh SteadmonMar 15, 2019
  10. Junio C HamanoMar 18, 2019
  11. Jeff KingMar 19, 2019
  12. Jeff KingMar 14, 2019
  13. Junio C HamanoMar 14, 2019
  14. Johannes SchindelinMar 14, 2019
  15. Josh SteadmonMar 15, 2019
  16. Jeff HostetlerMar 15, 2019
  17. Josh SteadmonMar 15, 2019
  18. Jeff HostetlerMar 18, 2019
  19. 0/1 Write trace2 output to directoriesJosh Steadmon, Mar 21, 2019
  20. 1/1 trace2: write to directory targetsJosh Steadmon, Mar 21, 2019
  21. Junio C HamanoMar 21, 2019
  22. Jeff HostetlerMar 21, 2019
  23. Junio C HamanoMar 22, 2019
  24. Jeff HostetlerMar 22, 2019
  25. 0/1 Write trace2 output to directoriesJosh Steadmon, Mar 21, 2019
  26. 1/1 trace2: write to directory targetsJosh Steadmon, Mar 21, 2019
  27. Ævar Arnfjörð BjarmasonMar 23, 2019
  28. Junio C HamanoMar 24, 2019
  29. Ævar Arnfjörð BjarmasonMar 24, 2019
  30. Junio C HamanoMar 25, 2019
  31. Ævar Arnfjörð BjarmasonMar 25, 2019
  32. Jeff HostetlerMar 25, 2019
  33. Jeff HostetlerMar 21, 2019
  34. Junio C HamanoMar 22, 2019

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.