Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not register fake repository as owner of ODB #6443

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 19, 2022

  1. Do not register fake repository as owner of ODB

    Accessing ODB is guaranteed to be thread-safe. Registering a
    fake repository (created via git_repository_wrap_odb()) may
    not register itself as owner of the ODB in order to maintain
    that guarantee. Otherwise, accessing objects from ODB will
    try to obtain the cache from the owning repository (via
    odb_cache()) and produce a race if this ODB is concurrently
    used to create fake repositories in other threads.
    Consequently, operations on fake repositories will interact
    with the ODB's cache instead of the repository's cache.
    oreiche committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    19711a9 View commit details
    Browse the repository at this point in the history