-
Notifications
You must be signed in to change notification settings - Fork 54
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
xLoader re-submit all resources when adding a new one to a dataset #75
Comments
I agree, this seems to be a problem. It occurs only with resources which are uploaded files, rather than links. I'm afraid I've not done much testing with uploads before. It doesn't seem right that IResourceUrlChanged fires for an uploaded resource every time that you save the dataset again in future. I wonder if that was unintended when @wardi implemented it: ckan/ckan@3e3a7c8 ? |
Ah, looks like this is being resolved here: ckan/ckan#5027 |
@davidread yes! I have been debugging and working on this. The fix we are doing to CKAN will solve this behaviour but will worth noticing that this will still happening until it is backported to 2.8.3. (and will happen with all previous versions of CKAN) This weekend I will do the PR in CKAN. |
@davidread The PR is created ckan/ckan#5033. I have test it locally and it solves this behaviour Do you think it is worth it to add this info in the Troubleshooting section of the README.md file of xloader? |
Nice one! |
Done! You can merge the PR #78 and close this issue! |
[QOLSVC-3902] reduce lock timeout to avoid deadlocks
How to Reproduce
ofkn/docker-ckan
but this one was also detected in a custom implementation for our customer)Details
In this logs I had a dataset with a Resource called
mini-csv.csv
, then I edited the dataset to add a new one calledmini-csv-2.csv
. As the logs shows, the instance was running, I created the new resource but the two resources where submited:Down belong the logs shows how xloader executed the jobs for both:
If I repeat the process and add a new file called
mini-csv-3.csv
it happens again, after rendernew_resource
all three resources are being submited to xloader:Some debug insights
I don't know exactly why is this happening but here are some insights from my debugging.
lib.dictization.resource_dict_save
is executed for each resource__init__
method ofResourceUpload
object sets thelast_modified
field.obj.url_changed = True
will be set each time another resource is edited/added to the package.notify()
method of xloader to be called since it implements IResourceUrlChangedThe text was updated successfully, but these errors were encountered: