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

handle many packs better #1750

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
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