[CalendarServer-changes] [9343] CalendarServer/trunk/txdav/caldav/datastore/sql.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 8 14:51:04 PDT 2012


Revision: 9343
          http://trac.macosforge.org/projects/calendarserver/changeset/9343
Author:   cdaboo at apple.com
Date:     2012-06-08 14:51:04 -0700 (Fri, 08 Jun 2012)
Log Message:
-----------
If on-demand time-range indexing is off (i.e. set to always index) force on-demand behavior always for the "inbox"
since that very rarely, if ever, gets a t-r query against it (and never gets freebusy).

Modified Paths:
--------------
    CalendarServer/trunk/txdav/caldav/datastore/sql.py

Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py	2012-06-08 01:11:47 UTC (rev 9342)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py	2012-06-08 21:51:04 UTC (rev 9343)
@@ -849,7 +849,12 @@
         # Setup appropriate txn
         txn = txn if txn is not None else self._txn
 
-        # Decide how far to expand based on the component
+        # inbox does things slightly differently
+        isInboxItem = self._parentCollection.name() == "inbox"
+
+        # Decide how far to expand based on the component. doInstanceIndexing will indicate whether we
+        # store expanded instance data immediately, or wait until a re-expand is triggered by some later
+        # operation.
         doInstanceIndexing = False
         master = component.masterComponent()
         if ( master is None or not component.isRecurring() ):
@@ -861,7 +866,7 @@
         else:
 
             # If migrating or re-creating or config option for delayed indexing is off, always index
-            if reCreate or txn._migrating or not config.FreeBusyIndexDelayedExpand:
+            if reCreate or txn._migrating or (not config.FreeBusyIndexDelayedExpand and not isInboxItem):
                 doInstanceIndexing = True
 
             # Duration into the future through which recurrences are expanded in the index
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120608/d7e25407/attachment.html>


More information about the calendarserver-changes mailing list