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

Destroying a DataladDataProvider should clean up associated DataladSystemSubset files #289

Open
prioux opened this issue Oct 2, 2024 · 0 comments

Comments

@prioux
Copy link
Member

prioux commented Oct 2, 2024

When a DataladDataProvider is destroyed, it might leave behind in the database one or many userfiles of type DataladSystemSubset.

These userfiles represent caching information for the datalad dasets; they are registered in the ScratchDataProvider and the userfiles all have names like TopDatalad.rr=5.dp=411.

The name of the DataladSystemSubset is an encoding. The rr=ID is the ID of the remote resource where the cache is located (because ScratchDataProvider content it local to each CBRAIN resource). The dp=ID is the actual ID of the associated DataladDataProvider.

We need a cleaner callback that, when a DataladDataProvider is destroyed, would also destroy all its associated DataladSystemSubset userfiles. They would be recognized by the dp=ID part in their names.

These scratch userfiles can simply be destroyed even they are officially on another remote resource, because CBRAIN's data cache cleaner will erase the leftover files eventually.

@prioux prioux changed the title DataladDataProvider to clean up DataladSystemSubset files when destroyed Destroying a DataladDataProvider should clean up associated DataladSystemSubset files Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant