-
Notifications
You must be signed in to change notification settings - Fork 2k
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
If a resource is deleted, the corresponding data in the DataStore should be deleted as well #3422
Comments
@metaodi You are of course absolutely correct. @smotornyuk will have a go at implementing this. It would be great if you could test this once there is a PR/ |
We could also use a command for cleaning out orphaned datastore tables |
@wardi maybe additionally, to cleanup "old" databases. But I think to have this implemented properly makes sense, doesn't it? |
Absolutely! (that's why I used the word "also") |
+1 to having a CLI command to clean orphaned datastore tables. |
I created a "quick & dirty" paster command to empty the orphaned tables, which saves us a lot of space on our DB server: opendata-swiss/ckanext-switzerland#137 It does not drop the tables, but simply calls the |
Fixed in #3425 |
Any chance the "quick & dirty" paster command to clean up orphaned datastore tables that @metaodi put together will be folded into core? |
@jqnatividad if there is a need, I can create a PR with the command for this repository. |
This appears to be fixed if you directly delete a resource. But if you delete and purge a data set (which also deletes its resources), the datastore tables are still there. |
CKAN Version if known (or site URL)
2.5.3
Please describe the expected behaviour
If a resource is deleted, the corresponding data in the DataStore should be deleted as well. Otherwise the DataStore will quickly overflow if you harvest a big source and for each resource a new table is created and the old one still in place.
Please describe the actual behaviour
Currently the deletion of a ressource does not affect the DataStore at all. But every table in the DataStore is linked to a resource in CKAN, so it's safe to assume they share the same lifecycle.
What steps can be taken to reproduce the issue?
The resource is still available in the DataStore
The text was updated successfully, but these errors were encountered: