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

Re: [RFC/WIP PATCH] object store classification

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 11, 2017, 18:46 UTC
Message-ID
<xmqqd1963j84.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170711180122.GG161700@google.com>
Brandon Williams <bmwill@google.com> writes:
Show 14 quoted lines
>>   the_repository -> the_object_store
>>   but the object store is a complex beast having different hash tables
>>   for the different alternates.
>
> After looking at the patch and some of the comments here I think that
> this is probably the best approach with a few tweaks (which may be
> completely unfounded because I'm not familiar with all the object store
> code).
>
> In an OO world I would envision a single object (let's say 'struct
> object_store') which is responsible for managing a repository's objects
> no matter where the individual objects came from (main object store or
> an alternate for that repository).  And if I understand correctly the
> single hash table that exists now caches objects like this.

I would say that conceptually an object-store object has an interface to answer "give me info on the object I can refer to with this object name". At the implementation level, it should have a hashtable (lazily populated) for all the objects in a single $GIT_OBJECT_DIRECTORY, grafts/replace info, and a set of pointers to other object-store instances that are its alternate object stores. You'd need to have a mechanism to avoid creating cycles in these pointers, of course.

Previous: Brandon WilliamsNext: Stefan Beller
Message 7 of 9 in “object store classification”
  1. object store classificationStefan Beller, Jul 6, 2017
  2. Junio C HamanoJul 7, 2017
  3. Ben PeartJul 7, 2017
  4. Junio C HamanoJul 7, 2017
  5. Stefan BellerJul 11, 2017
  6. Brandon WilliamsJul 11, 2017
  7. Junio C HamanoJul 11, 2017
  8. Stefan BellerJul 11, 2017
  9. Junio C HamanoJul 11, 2017

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.