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

feat(bytes): switch to a single directory for the flat store #1855

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Nov 30, 2023

Description

Have the constructor for the bao db take a single directory. Internally it will still have 3 directories, although this is not strictly speaking necessary because the files can be distinguished by their extension.

Implements #1662

Notes & open questions

This does not yet include a migration. Do we need one, or do we declare that the number of changes is just too big for this release? It's not super hard to write, but we would then have to drag it around for a while.

Added a migration

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.

@@ -1173,17 +1173,27 @@ impl Store {
Ok(())
}

/// Path to the directory where complete files and outboard files are stored.
pub(crate) fn complete_path(root: &Path) -> PathBuf {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are pub(crate) intentionally since this is an internal detail. This means that some tests have to manually duplicate the code, but I think that is fine.

@rklaehn rklaehn force-pushed the blob-store-single-dir branch from b3710cd to 25384aa Compare November 30, 2023 08:18
Just copy the dirs if they exist and if the v1 dirs don't exist.
@rklaehn rklaehn marked this pull request as ready for review November 30, 2023 10:06
this is a positive test. Every single other cli test tests what happens
when there is no old version.
@rklaehn rklaehn enabled auto-merge November 30, 2023 12:44
@rklaehn rklaehn added this pull request to the merge queue Nov 30, 2023
Merged via the queue into main with commit adc88f3 Nov 30, 2023
15 checks passed
@rklaehn rklaehn deleted the blob-store-single-dir branch April 10, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants