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

Check datastore_active on resource update #171

Closed
ThrawnCA opened this issue Sep 6, 2022 · 4 comments
Closed

Check datastore_active on resource update #171

ThrawnCA opened this issue Sep 6, 2022 · 4 comments

Comments

@ThrawnCA
Copy link
Collaborator

ThrawnCA commented Sep 6, 2022

The datastore_active flag can sometimes get out of sync with the actual state of the datastore, eg due to race conditions like ckan/ckan#4663

It should be relatively cheap to add an "after update" step to ensure that the flag matches the datastore state.

ThrawnCA added a commit to qld-gov-au/ckanext-xloader that referenced this issue Sep 6, 2022
…an#171, QOL-9327

- On resource update, compare the flag to the actual state of the datastore, and update the flag if they don't match
ThrawnCA added a commit to qld-gov-au/ckanext-xloader that referenced this issue Sep 6, 2022
…rces

QOL-9327 Make datastore loading more robust, ckan#171
@wardi
Copy link
Contributor

wardi commented Sep 6, 2022

👍 how about a cli command to update datastore_active for all/some resources as well?

@ThrawnCA
Copy link
Collaborator Author

ThrawnCA commented Sep 6, 2022

That would be possible... Although perhaps a more general solution would be better. This isn't the first time I've seen a situation where it would be helpful to essentially "bump" a resource/dataset and apply the latest after_update hooks from all extensions. Perhaps a command could be added to the core to apply a package_patch or resource_patch to all or selected objects.

@wardi
Copy link
Contributor

wardi commented Sep 6, 2022

That's a good idea. was actually thinking of adding an action to core to reindex a dataset. Maybe things like checking datastore_active, updating tracking counts etc. could be hooked to that action.

ThrawnCA added a commit to qld-gov-au/ckanext-xloader that referenced this issue Sep 6, 2022
amercader added a commit that referenced this issue Nov 30, 2022
@ThrawnCA
Copy link
Collaborator Author

A CLI command to bump the state of a dataset could be raised as a separate issue, but the original purpose of this one is complete.

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

2 participants