apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

getetag return None in calendar folders when using sql datastore backend #316

Closed macosforgebot closed 13 years ago

macosforgebot commented 13 years ago

pedro@… originally submitted this as ticket:405


getetags must return a consistent value that helps keeping track of folder changes.

I have traced the bug to the file md5() function in CommonHomeChild class within txdav/common/datastore/sql.py. This function return None always.

macosforgebot commented 13 years ago

mail@… originally submitted this as comment:1:⁠ticket:405


Just to clarify:

In source:/CalendarServer/trunk/txdav/common/datastore/sql.py@6909#L1663 there is in fact simply none returned.

    def md5(self):
        return None
macosforgebot commented 13 years ago

@wsanchez originally submitted this as comment:2:⁠ticket:405


ETags are not an appropriate way to track changes to collection resources; it's only a good way to track the rendered representation of a collection. There is no requirement that ETags change when collections add or remove members, etc.

This is why we invented CTags as a work-around and now support the sync report.