-
Notifications
You must be signed in to change notification settings - Fork 302
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
PATCH requests with non-matching deletions should succeed #1085
Comments
Hmmm, no, |
From the SPARQL UPDATE spec:
So DELETE's without matches should return a 200 it seems. So this indeed looks like a bug in NSS. |
Note: 409 Conflict-- A SPARQL update message often contains both a DELETE and then an INSERT. |
@timbl I agree, but unfortunately that is in conflict with the SPARQL 1.1 UPDATE W3C Recommendation:
That's why I created linkeddata/rdflib.js#299, could you have a look at that one? |
Grumble. a system has to have semaphores |
But don't we have a semaphore in the shape of an |
That might be too restricted. If you changed something unrelated to the file, I might still want to send my patch. |
Yes, but you would have to see how you solve the potential conflict. Besides, you can always do a I think apps that expects frequent writes from many parties will need to make sure that resource descriptions don't grow too large by finding a way to divide-and-conquer, to lower the likelihood of conflicts. I think something like https://www.w3.org/1999/04/Editing/ is a reasonable thing to implement, and that resources SHOULD have an |
I am very disappointed to see the SPARQL 1.1 UPDATE spec excerpt, which says to me there's a tragic bug in the SPARQL 1.1 UPDATE spec, and a failure to learn from existing standards and writings, particularly those which support multiple users acting on the same resources (e.g., ODBC clients of a DBMS instance). I would suggest that the appropriate response is not a full-success, but a warning or soft-fail/soft-success like ODBC's (We MUST find a way to modify W3 specs more quickly than is currently possible, especially when such app-blocking errors are discovered!) |
I like that idea; we can indeed add extra info to a 200. However, the problem here is that we want it to work like a semaphore: a patch with both a delete and an insert should only succeed if the delete succeeded. Learning afterwards that one did through but not the other is a consolation prize. |
I think that the immediate fix is to use the idea from the 1999 Editing note even though there are cases where it would not work. If we go much further, we will quickly find ourselves in WebDAV-land (which we might need soon anyway). As for the problematic 200, indeed, we could perhaps use another 2xx code, but perhaps we could do a 303 pointing to a resource with more information? |
Unfortunately, the situation is worse, since |
This issue is about changing the Solid API, which is every important and much more important than a bug in a particular server, implementation. |
In my opinion, the solid system works, by using 409 Conflict as a crucial part of the architecture. It is in formally "willful violation" of the SPARQL Update spec, and the two communities should in the long term discuss that issue. But for now, the solid system works, and we must keep that. Possible future paths are many - a different mime type, dropping sparql update for n3 patches, changing the update spec, etc. But for now we must keep the 409 to keep the collaborative editing working. |
OK. I'll close this and #1086. |
We currently have evidence (inrupt/generator-solid-react#41 (comment)) that a patch with a DELETE block that has no matches will cause a 409. Is this correct? Should there at least be one match with a DELETE?
The text was updated successfully, but these errors were encountered: