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

[TOPIC 1/12] Next-gen reference backends

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 2, 2023, 15:17 UTC
Message-ID
<ZRrfHJYDEfdNO4Ma@nand.local>
In-Reply-To
<ZRregi3JJXFs4Msb@nand.local>
(Presenter: Patrick Steinhardt, Notetaker: Karthik Nayak)
* Summary: There have been multiple proposals for reference backends on the
  mailing list. Trying to converge to one solution.
* Problem: At GitLab we have certain repos with large amounts of references.
  Some repos have multi-million refs which causes scalability issues.
   * Current files backend uses a combination of loose files and packed-refs.
   * Deletion performance is bad.
   * Reference lookups are slow.
   * Storage space is also large.
   * There are some patches which improved the situation. e.g. skip-list for
     packed-refs by Taylor.
   * Atomic updates are currently not possible.
   * This is not an issue only faced by GitLab
* Two solutions proposed:
   * Reftables: Originally implemented by JGit (Shawn Pearce, 2017)
      * Google was storing the data in a table with one ref per row. This data
        was encrypted, which changes the ordering.
      * This led to realizing the ref storage itself was not optimal, so based
        on existing solutions at Google there was a proposal by Shawn and was
        implemented in JGit.
      * This solved the ref storage problem at Google.
      * The implementation in JGit by adoption was low because of compatibility
        requirement with CGit.
      * New patch series submitted which swaps out the packed-refs with
        ref-tables while keeping the existing file based loose-refs.
   * Incremental take on reference backend (aka. packed-refs v2) by Derrick
      * Uses pre-existing infrastructure in the git project. Makes it a more
        natural extension.
      * First part was to support a multi backend structure
      * Second part was packed references v2 in the Git project
* Question: How do we take it forward from here.
   * Emily: If the existing backend exists as a library. Might be easier to
     replace and experiment with.
      * Jeff: A lot of work in that direction has already been landed. But there
        is still some bleed of the implementation in other parts of the code.
        Might be messy to cleanup.
      * Patrick: Different implementations by different hosting providers with
        different requirements might cause issues for clients.[b]
   * Deletion performance is not the only issue faced (at GitLab) there are also
     deadlocks faced around this.
   * brian: If you have a large number of remote tracking refs you face the same
     perf issues.
   * Patrick: Any preference of which solution to go forward. GitLab is
     interested to pick this up and mostly going forward with reftables.
   * Reftables does support tombstoning, should solve the problem with multiple
     deletions.
      * There is still a problem with refs being a prefix of other refs.
   * Is there a world where loose refs are removed completely and replaced with
     reftables.
      * Debugging is much easier with loose refs, reftables is binary
        formatting. Might need additional tooling here. This is already proved
        to be working at Google.
Previous: Taylor BlauNext: Taylor Blau
Message 3 of 14 in “Notes from the Git Contributor's Summit, 2023”
  1. Taylor BlauOct 2, 2023
  2. 0/12 Welcome / Conservancy UpdateTaylor Blau, Oct 2, 2023
  3. 1/12 Next-gen reference backendsTaylor Blau, Oct 2, 2023
  4. 02/12 Libification Goals and ProgressTaylor Blau, Oct 2, 2023
  5. 3/12 Designing a Makefile for multiple librariesTaylor Blau, Oct 2, 2023
  6. 4/12 Scaling Git from a forge's perspectiveTaylor Blau, Oct 2, 2023
  7. 5/12 Replacing Git LFS using multiple promisor remotesTaylor Blau, Oct 2, 2023
  8. 6/12 Clarifying backwards compatibility and when we break itTaylor Blau, Oct 2, 2023
  9. 7/12 Authentication to new hosts without setupTaylor Blau, Oct 2, 2023
  10. 8/12 Update on jj, including at GoogleTaylor Blau, Oct 2, 2023
  11. 9/12 Code churn and cleanupsTaylor Blau, Oct 2, 2023
  12. 10/12 Project management practicesTaylor Blau, Oct 2, 2023
  13. 11/12 Improving new contributor on-boardingTaylor Blau, Oct 2, 2023
  14. 12/12 Overflow discussionTaylor Blau, Oct 2, 2023

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.