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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetcher cache cleanups #10465

Merged
merged 4 commits into from May 6, 2024
Merged

Fetcher cache cleanups #10465

merged 4 commits into from May 6, 2024

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Apr 10, 2024

Motivation

This PR:

  • Removes the "locked" / "immutable" flag from the cache. (It was already mostly unused.)
  • Ensures that all cache entries that contain a store path also contain the store prefix, so that different store prefixes don't collide. This removes the explicit store field in fetchToStore()'s cache key.
  • Removes the _what and type fields, turning them into a mandatory part of the cache key.

Since this is a schema change, the fetcher cache is renamed to fetcher-cache-v2.sqlite.

Depends on #10414.

Context

Priorities and Process

Add 馃憤 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added with-tests Issues related to testing. PRs with tests have some priority fetching Networking with the outside (non-Nix) world labels Apr 10, 2024
Copy link

dpulls bot commented Apr 12, 2024

馃帀 All dependencies have been resolved !

This also reworks the Mercurial fetcher (which was still using the
old cache interface) to have two distinct cache mappings:

* A ref-to-rev mapping, which is store-independent.
* A rev-to-store-path mapping.
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more clear

src/libfetchers/cache.hh Outdated Show resolved Hide resolved
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
@edolstra edolstra enabled auto-merge May 6, 2024 19:11
@edolstra edolstra merged commit da3381d into NixOS:master May 6, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetching Networking with the outside (non-Nix) world with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants