Closed allexzander closed 1 year ago
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 https://github.com/nextcloud/files_lock/issues/147 / https://github.com/nextcloud/server/issues/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 https://github.com/nextcloud/files_lock/pull/163
@juliushaertl
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 https://github.com/nextcloud/files_lock/pull/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: