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

index: propagate some of index load errors #2721

Merged
merged 6 commits into from
Dec 18, 2023
Merged

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Dec 18, 2023

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 6 commits December 18, 2023 22:19
This is needed to remove .unwrap()s from DefaultIndexStore.
I thought IndexLoadError and DefaultIndexStoreError would represent "load" and
"store" failures respectively, but they aren't. Actually, DefaultIndexStoreError
is the store-level error, and IndexLoadError should be wrapped in it.
The idea is that we don't have to reload parent files as we already have the
chain of the parent segments. The resulting readonly index will be constructed
from the loaded parent segments + local entries blob.
This should be cheaper, and more importantly, we no longer need to propagate
ReadonlyIndexLoadError to the caller.
@yuja yuja merged commit eccb9b7 into jj-vcs:main Dec 18, 2023
15 checks passed
@yuja yuja deleted the push-mwslnrkvsszy branch December 18, 2023 22:41
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.

2 participants