-
Notifications
You must be signed in to change notification settings - Fork 8
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
Lock and Unlock does not provide the new etag value for a file in question #162
Comments
FYI this can cause a ton of issues, especially with larger files. If your workflow is:
and the file is, say, 100mb or more, you risk causing conflicts, besides the 3x inflation of network traffic. |
looping in @juliushaertl |
We can expose the changed etag with the lock response, however having a separate one is not really feasible as we would need that separation for a metadata tag as described in #147 / nextcloud/server#8477 A quick implementation draft for returning the etag property on the user LOCK/UNLOCK webdav requests, so maybe that already helps for this specific case #163 |
This will help, I would appreciate it if this gets merged/deployed (at least to one of try.nextcloud.com instances). |
@juliushaertl So I tested it and the etag is returned but is still the old one |
@allexzander could you try again? Julius updated the PR. |
@max-nextcloud Yes, changes on desktop client's side already merged |
When we lock or unlock a file its etag gets modified and is later synced by the desktop client. The problem is, in case we also modify a file locally after we lock it, the etag we are storing in the desktop client is still the one before calling lock/unlock, and, since we've modified a file as well as its etag got changed on the server - we are getting a false positive file conflict. The etag is used by desktop client to detect changes made to the file on the server.
Possible solutions (not sure why the etag is chosen to mark file lock state change, could be that we need a more exclusive way of handling this not involving the etag):
Example of XML response I am getting:
The text was updated successfully, but these errors were encountered: