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

Re: Implementing reftable in Git

From
Stefan Beller <sbeller@google.com>
Date
May 9, 2018, 17:55 UTC
Message-ID
<CAGZ79kYwdTriaoev5EYvoSVA+ZummdKm3rjY261KucptjhytUQ@mail.gmail.com>
In-Reply-To
<20180509174830.GJ10348@aiede.svl.corp.google.com>
On Wed, May 9, 2018 at 10:48 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Stefan Beller wrote:
>
>> * We *might* be able to use reftables in negotiation later
>>   ("client: Last I fetched, you said your latest transaction
>>   number was '5' with the hash over all refs to be <sha1>;
>>   server: ok, here are the refs and the pack, you're welcome").
>
> Do you mean that reftable's reflog layout makes this easier?
>
> It's not clear to me why this wouldn't work with the current
> reflogs.

Because of D/F conflicts we may not know all remote refs (and their ref logs), such that "the hash over all refs" on the remote is error prone to compute. Without transaction numbers it is also cumbersome for the server to remember the state. We could try it based on the current refs, but I'd think it is not easy to do, whereas reftables bring some subtle advantages that allow for such easier negotiation.

Show 13 quoted lines
>
> [...]
>> On Wed, May 9, 2018 at 7:33 AM, Christian Couder
>> <christian.couder@gmail.com> wrote:
>
>>> During the last Git Merge conference last March Stefan talked about
>>> reftable. In Alex Vandiver's notes [1] it is asked that people
>>> announce it on the list when they start working on it,
>>
>> Mostly because many parties want to see it implemnented
>> and were not sure when they could start implementing it.
>
> And to coordinate / help each other!

Yes. Usually open source contributions are so sparse, that just doing it and then sending it to the mailing list does not produce contention or conflict (double work), but this seemed like a race condition waiting to happen. ;)

Show 7 quoted lines
>> With that said, please implement it in a way that it can not just be used as
>> a refs backend, but can easily be re-used to write ref advertisements
>> onto the wire?
>
> Can you spell this out a little more for me?  At first glance it's not
> obvious to me how knowing about this potential use would affect the
> initial code.

Yeah me neither. I just want to make Christian aware of the potential use cases, that come afterwards, so it can influence his design decisions for the implementation.

Previous: Jonathan NiederNext: Ævar Arnfjörð Bjarmason
Message 10 of 13 in “Implementing reftable in Git”
  1. Christian CouderMay 9, 2018
  2. Derrick StoleeMay 9, 2018
  3. Duy NguyenMay 9, 2018
  4. Jonathan NiederMay 9, 2018
  5. Carlos Martín NietoMay 9, 2018
  6. Jonathan NiederMay 9, 2018
  7. Carlos Martín NietoMay 9, 2018
  8. Stefan BellerMay 9, 2018
  9. Jonathan NiederMay 9, 2018
  10. Stefan BellerMay 9, 2018
  11. Ævar Arnfjörð BjarmasonMay 9, 2018
  12. Michael HaggertyMay 11, 2018
  13. David TurnerMay 11, 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.