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 7, 2017, 16:50 UTC
Message-ID
<xmqq4luochtv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<c9a6f3f0-e338-a200-6b57-48b5d926d31c@gmail.com>
Ben Peart <peartben@gmail.com> writes:
Show 8 quoted lines
> For more API/state design purity, I wonder if there should be an
> object_store structure that is passed to each of the object store APIs
> instead of passing the repository object. The repository object could
> then contain an instance of the object_store structure.
>
> That said, I haven't take a close look at all the code in object.c to
> see if all the data needed can be cleanly abstracted into an
> object_store structure.

My gut feeling was it is just the large hashtable that keeps track of objects we have seen, but the object replacement/grafts and other things may also want to become per-repository.

> One concern I have is that the global state refactoring effort will
> just result in all the global state getting moved into a single
> (global) repository object thus limiting it's usefulness.

I actually am not worried about it that much, and I say this with the background of having done the same "grouping a set of global state variables into a single structure and turning them into a single default instance" for the_index. Whether you like it or not, the majority of operations do work on the default instance---that was why the operations could live with just "a set of global state variables" in the first place, and the convenience compatibility macros that allow you to operate on the fields of the default instance as if they were separate variables have been a huge typesaver that also reduces the cognitive burden. I'd expect that the same will hold for the new "repository" and the "object_store" abstractions.

Previous: Ben PeartNext: Stefan Beller
Message 4 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.