-
Notifications
You must be signed in to change notification settings - Fork 184
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
etag propagation is not always synchronous #3988
Comments
A proper implementation on the client and server side would use the @dragotin @felix-schwarz IIRC the clients need the file id in the response of a PUT request, right? What about the etag? We can add I would argue that a |
As of now, the clients expect the ETag in response to the PUT (or the last action in the chunked uploads). We do not want to change that now. That is also what we are aiming for with the asynchronous upload: The ETag is returned immediately with the last PUT, and the server takes care to set/change the ETag accordingly. Note that theETag just needs to change, no further semantics, so it should be not so difficult for the server to even do that synchronous. |
Note: we generally see this issue in tests that do a MOVE or COPY or some upload-overwrite, the response to the request has an eTag for the particular resource. But also the eTAG of parent folders up to the root is expected to change. The delay (async behavior) is observed when the test scenario "quickly" does API requests that check the eTag of the parent, grand-parent etc folders. So, IMO, the current implementation is OK - clients will get an appropriate eTAG in the response for the resource that they just uploaded, copied, moved... Other clients are polling higher folders to "notice" an eTag change, and then discover and sync the changes from the server to their local storage. Those clients might not notice the higher-level eTag change for a few seconds. (Typically in practice we see that the higher-level eTags are updated within 1 second anyway). For clients that are polling at around 30 second intervals anyway, 1 or 2 seconds delay in the root eTag changing is not really going to be significant. |
Ah, seems I overlooked that it is about the ETag change of the directories above the uploaded item, not the item itself. I agree, that sounds ok if that does not happen immediately. |
@butonic At the moment, the iOS client uses neither So the expectation from the iOS client is that when the server response to the upload request has been received:
The iOS client should not run into any issues if the Regarding returning metadata in the upload response, as discussed in the past, I'd love to see a mechanism for clients to specify which properties of an uploaded file should be returned in the response through special request and response HTTP headers. F.ex. by tunneling a WebDAV request/response via |
With regard to the latter, could you point me to an issue? I'd like to propose using the Unfortunately, the IANA preference registry has no property we could use to tell the server which properties to return in the response. Related: #3782 But all this is not about the original question: when is async etag propagation allowed? Do clients expect the root etag to change synchronously? Maybe a simple |
I think it can be summarized:
|
Which brings us back to owncloud/core#14531 (comment)
and owncloud/core#14531 (comment)
👋 to @evert if he is still around. Thx for all the insights you provided over the years! It is purely on our side to not having followad your advice any better... To clarify: in the webdav rfc the etag purpose is described as
But webdav collections are not required to have a GET representation that correlates with the listing of the collection, http://www.webdav.org/specs/rfc4918.html#rfc.section.9.4:
So we basically made up that semantic meaning on our own. While The
and then they clarify with this:
|
Thank you!! |
well yes. I am kinda lost how that relates to the initial problem of this issue. I think @individual-it has a reasonable answer, so I am closing this one. Feel free to re-open. |
@dragotin there is no place where we properly documented what an etag in owncloud world means. Without a common understanding of the concept we cannot discuss this topic. But I agree: etag propagation can always be asyncronous. |
in some cases etags are not propagated synchronous, e.g. tests like
apiWebdavEtagPropagation1/moveFileFolder.feature:184
orapiWebdavEtagPropagation2/copyFileFolder.feature:188
fail randomly in CI@butonic could you please define cases where the etag propagation is allowed to be async, so that we can adjust the tests accordingly
The text was updated successfully, but these errors were encountered: