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

Can't expand snapshot from a pack if pack name is omitted #91

Closed
marxin opened this issue Sep 12, 2022 · 6 comments
Closed

Can't expand snapshot from a pack if pack name is omitted #91

marxin opened this issue Sep 12, 2022 · 6 comments

Comments

@marxin
Copy link

marxin commented Sep 12, 2022

Again, using the repository mentioned in #20, once I removed the loose objects, I can't extract a snapshot based by snapshot name only:

$ cat elfshaker_data/HEAD 
loose/e55674b86a10e695cea2f45c0472402b97cc2dfb:e55674b86a10e695cea2f45c0472402b97cc2dfb
$ elfshaker extract 3f585bdaa7f6fb02753ba7b4918f065357a6b7fd 
[ERROR (main) 30.874291ms]: *FATAL*: couldn't copy /tmp/elfshaker/elfshaker_data/loose/ef/34/7decdd22a4157e9966fd86b7f0a1af5ab3a5 to /tmp/elfshaker/usr/local/lib/libssp_nonshared.a (NotFound)
$ elfshaker extract all:3f585bdaa7f6fb02753ba7b4918f065357a6b7fd 
A 	0 files
D 	0 files
M 	21 files
Extracted 'all:3f585bdaa7f6fb02753ba7b4918f065357a6b7fd'
$ cat elfshaker_data/HEAD 
all:3f585bdaa7f6fb02753ba7b4918f065357a6b7fd

@Mistuke

@peterwaller-arm
Copy link
Contributor

peterwaller-arm commented Sep 13, 2022

Do you mean #20, or some other issue? Are you able to provide specific a sequence of commands which causes this issue?

Additionally, the output of find -type f in the elfshaker_data directory would be useful to see what files you have.

@veselink1 are you able to imagine how this happens? This may take some time to get to the bottom of. But the presence of a HEAD pointing to a missing loose [object edit: snapshot] could be problematic here. I'm not clear yet on why elfshaker is trying to extract a loose object assuming that you have removed the loose index.

@veselink1
Copy link
Member

Sounds like the loose objects in elfshaker_data/loose were deleted but the loose snapshots in elfshaker_data/packs/loose created by elfshaker store were not. elfshaker extract has found the loose snapshot first and tries to use the loose objects, which have been removed.

@marxin
Copy link
Author

marxin commented Sep 13, 2022

Do you mean #20, or some other issue? Are you able to provide specific a sequence of commands which causes this issue?

Sorry, #90 is the correct link.

@marxin
Copy link
Author

marxin commented Sep 13, 2022

Sounds like the loose objects in elfshaker_data/loose were deleted but the loose snapshots in elfshaker_data/packs/loose created by elfshaker store were not.

I can confirm that and if I remove elfshaker_data/packs/loose all is fine!

So please, implement a command that wipes all loose snapshots, which is the killer feature of elfshaker. Without that, the size benefit is negligible.

@marxin marxin closed this as completed Sep 13, 2022
@peterwaller-arm
Copy link
Contributor

Thanks for the follow up. The current intent is to implement gc (#17) which would delete loose things (and could run after a pack, for example), and then this won't been an issue.

@marxin
Copy link
Author

marxin commented Sep 13, 2022

I thank you for the feedback you provided.

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

No branches or pull requests

3 participants