Skip to content

handle many packs better #1750

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

Merged
merged 2 commits into from
Jan 14, 2025
Merged

handle many packs better #1750

merged 2 commits into from
Jan 14, 2025

Conversation

Byron
Copy link
Member

@Byron Byron commented Jan 9, 2025

This is related to the issue originally reported here: frewsxcv/rust-crates-index#181.

At least past of the problem is that there are more and more packs accumulating, and eventually the pack-map is full.
This leads to objects not being found anymore (outside of any possible race conditions).

Tasks

  • reproduce the 'pack overflow' issue: Object de01e95cf873164afae15e080903b6a7b22d6329 as referred to by "refs/remotes/origin/master" could not be found
    • fix it
  • reproduce the consistency issue: /gix-odb-0.66.0/src/store_impls/dynamic/load_index.rs:374:13: if the generation changed, the slot index must have changed for sure
    • fix it

…an hold.

Internally, there is a statically allocated vec which holds opened packs and
indices.
When reconciling the disk-state with what's currently loaded, it was possible
to get into a situation where there were more files than we could fit into
the slotmap and got into an invalid state.

The system now generously trashes existing slots to be able to load more rencent ones,
which seems to help in this situation.
It's probably still leading to strange situations where not all objects can be read.
@Byron Byron force-pushed the odb-issue branch 2 times, most recently from 5a9384b to 7f4e571 Compare January 14, 2025 05:43
@Byron Byron merged commit e4fb21e into main Jan 14, 2025
20 checks passed
@Byron Byron deleted the odb-issue branch January 14, 2025 06:22
facebook-github-bot pushed a commit to facebookincubator/reindeer that referenced this pull request Apr 2, 2025
Summary:
Similar to D66758489. Upgrade `gix` libraries.

I'd like to try `gix-odb` (to replace libgit2) in sapling. I read its recent
changelog and GitoxideLabs/gitoxide#1750 looks
concerning.

So I'd like to upgrade `gix-odb` first to include the fix, before switching.

Reviewed By: RajivTS

Differential Revision: D72286005

fbshipit-source-id: 9ca247f3c384c4fb19e0d1944013305b9f76f01c
facebook-github-bot pushed a commit to facebook/sapling that referenced this pull request Apr 2, 2025
Summary:
Similar to D66758489. Upgrade `gix` libraries.

I'd like to try `gix-odb` (to replace libgit2) in sapling. I read its recent
changelog and GitoxideLabs/gitoxide#1750 looks
concerning.

So I'd like to upgrade `gix-odb` first to include the fix, before switching.

Reviewed By: RajivTS

Differential Revision: D72286005

fbshipit-source-id: 9ca247f3c384c4fb19e0d1944013305b9f76f01c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant