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

Re: [RFC] Generation Number v2

From
Derrick Stolee <stolee@gmail.com>
Date
Oct 31, 2018, 13:04 UTC
Message-ID
<6902dbff-d9f6-e897-2c20-d0cb47a50795@gmail.com>
In-Reply-To
<875zxil1if.fsf@evledraar.gmail.com>
On 10/31/2018 8:54 AM, Ævar Arnfjörð Bjarmason wrote:
Show 31 quoted lines
> On Tue, Oct 30 2018, Junio C Hamano wrote:
>
>> Derrick Stolee <stolee@gmail.com> writes:
>>> In contrast, maximum generation numbers and corrected commit
>>> dates both performed quite well. They are frequently the top
>>> two performing indexes, and rarely significantly different.
>>>
>>> The trade-off here now seems to be: which _property_ is more important,
>>> locally-computable or backwards-compatible?
>> Nice summary.
>>
>> As I already said, I personally do not think being compatible with
>> currently deployed clients is important at all (primarily because I
>> still consider the whole thing experimental), and there is a clear
>> way forward once we correct the mistake of not having a version
>> number in the file format that tells the updated clients to ignore
>> the generation numbers.  For longer term viability, we should pick
>> something that is immutable, reproducible, computable with minimum
>> input---all of which would lead to being incrementally computable, I
>> would think.
> I think it depends on what we mean by backwards compatibility. None of
> our docs are saying this is experimental right now, just that it's
> opt-in like so many other git-config(1) options.
>
> So if we mean breaking backwards compatibility in that we'll write a new
> file or clobber the existing one with a version older clients can't use
> as an optimization, fine.
>
> But it would be bad to produce a hard error on older clients, but
> avoiding that seems as easy as just creating a "commit-graph2" file in
> .git/objects/info/.

Well, we have a 1-byte version number following the "CGPH" header in the commit-graph file, and clients will ignore the commit-graph file if that number is not "1". My hope for backwards-compatibility was to avoid incrementing this value and instead use the unused 8th byte.

However, it appears that we are destined to increment that version number, anyway. Here is my list for what needs to be in the next version of the commit-graph file format:

1. A four-byte hash version.
2. File incrementality (split commit-graph).
3. Reachability Index versioning

Most of these changes will happen in the file header. The chunks themselves don't need to change, but some chunks may be added that only make sense in v2 commit-graphs.

Thanks, -Stolee

Previous: Ævar Arnfjörð BjarmasonNext: Jakub Narebski
Message 13 of 17 in “[RFC] Generation Number v2”
  1. Derrick StoleeOct 29, 2018
  2. Stefan BellerOct 29, 2018
  3. Derrick StoleeOct 29, 2018
  4. Jakub NarebskiNov 1, 2018
  5. Jakub NarebskiNov 2, 2018
  6. Jakub NarebskiNov 3, 2018
  7. Derrick StoleeOct 29, 2018
  8. Jakub NarebskiNov 1, 2018
  9. Junio C HamanoOct 30, 2018
  10. Derrick StoleeOct 31, 2018
  11. Jakub NarebskiNov 2, 2018
  12. Ævar Arnfjörð BjarmasonOct 31, 2018
  13. Derrick StoleeOct 31, 2018
  14. Jakub NarebskiNov 2, 2018
  15. Jakub NarebskiNov 1, 2018
  16. Derrick StoleeNov 1, 2018
  17. Jakub NarebskiNov 3, 2018

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.