Open butonic opened 2 years ago
@butonic another pointer: https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md#restrictions-and-limitations
after GA issue
Discussion with @dragotin @micbar @michaelstingl @felix-schwarz Discussion status:
m-tag
(new) for metadata changes on folders (future)@dragotin @felix-schwarz please continue the discussion
We will have cTag
and eTag
on the graph api anyway as described in the MS Graph
section above. No need to invent an m-tag
. eTag
is for the entire item (metadata + content). cTag
would be new and would be content only.
eTag
is for the entire item (metadata + content).
Perfect! 😻
cTag
would be new and would be content only.
@TheOneRing @felix-schwarz do we have a requirement for propagation of content-only changes? I don't think so…
I don't think so.
Currently, the ETag
is used to signal:
If the ETag
of files also changes for metadata changes, old clients get a signal that the file contents changed and to re-download the file (unnecessarily - in the case of metadata-only changes).
Therefore a CTag
is essential for clients to be able to put an ETag
-change into context - and to distinguish between a mere metadata change and an actual file content change to determine if a file should be re-downloaded.
Client updates will be needed for them to take advantage of the CTag
to avoid unnecessary transfers.
The idea for a metadata-only MTag
came from trying to find a backward-compatible way to signal metadata changes, where existing clients continue to work as expected - and updated clients can take advantage of metadata change propagation via the MTag
.
Regarding other WebDAV-based clients or sync solutions, I have no insight about how they interpret an ETag
change. But if they interpret an ETag
change as "file contents changed", using the ETag
to propagate both metadata and content changes might cause unwanted effects there.
Current file checksum could be used the same way as the cTag
. In oC10 world, not all files have a checksum.
When a reverse proxy changes the content encoding by eg. compressing a plain text stream via gzip, it also changes the etag: Bug 63932 - Content compression breaks contract of ETag
While the desktop client prefers the
OC-Etag
it has learned to strip-gzip
and maybe theW/
prefix from the regularETag
as a fallback: https://github.com/owncloud/client/issues/3946#issuecomment-147985427However, https://datatracker.ietf.org/doc/html/rfc7232#section-2.1 states
@JanAckermann noticed that the owncloud-sdk is not yet prepared for this kind of etag handling. Please link your PR here. https://github.com/owncloud/owncloud-sdk/pull/1067 https://github.com/owncloud/web/pull/6952
@michaelstingl I wonder if iOS and android handle this somehow.
owncloud
The core issue that lead to
OC-ETag
is https://github.com/owncloud/core/issues/9005 which explains why we are now using our ownOC-ETag
header.I'm still not 100% sure we are using etags correctly. AFAICT we should be using a ctag (content tag) to implement change detection in collections, as google recommends: https://developers.google.com/calendar/caldav/v2/guide
CTag and DAV:sync-token
However, the caldav-ctag-03 RFC has been deprecated in 2015:
https://sabre.io/dav/building-a-caldav-client/ shows exactly how a PROPFIND with both
cs:getctag
andDAV:sync-token
would look like, especially what form of URL to expect in the ̀ sync-token`.MS Graph
ms graph has similar concepts, it just uses json:
Property | Type | Description -- | -- | -- cTag | String | An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note: This property is not returned if the item is a folder. Read-only. eTag | String | eTag for the entire item (metadata + content). Read-only.But similar to the webdav sync is has a
/delta
endpoint fortoken
based sync: https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_delta?view=odsp-graph-onlineFuture
Both protocols indicate that having a deticated property to detect recursive changes makes sense. IMO we should
DAV:sync-token
in ocdav,OC-ETag
in the clientsRelated:
https://github.com/cernbox/smashbox/issues/46