Closed Bug 797014 Opened 12 years ago Closed 12 years ago

[calendar] Caldav only sync 30 days in the past + future.

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect, P1)

defect

Tracking

(blocking-basecamp:+)

VERIFIED FIXED
blocking-basecamp +

People

(Reporter: jlal, Assigned: jlal)

References

Details

(Keywords: crash, perf, Whiteboard: [LOE:S])

Attachments

(1 file)

We should only sync 30-days in the past on initial sync and then keep to that range.

This bug is just for the initial sync after that we will not modify the filter range so to avoid the recurring event issues noted below. Those issues can be solved in a followup bug.

Steps:

1. Determine filter range (30 days in past + no end date)
2. Store that time in calendar store as the initial sync date
3. modify the current calendar query (in the caldav service) to only
   query between range in step 1. 


(Event store changes can be ignored as we should never have dates that occur before the initial sync date as it will never change)


NOTES:

CalDAV states (http://pretty-rfc.herokuapp.com/RFC4791#example-partial-retrieval-of-events-by-time-range) that recurring times that overlap the sync period will be returned. Which is good but recurring events must be fully expanded when found so we may receive multiple instances of the same event (if it is recurring and overlaps) and have previously expanded it. In those cases we need to skip adding/expanding those events.
Assignee: nobody → jlal
blocking-basecamp: --- → ?
Component: Gaia → Gaia::Calendar
Just want to make this clear that this is a P1 and should also be a blocker. 
While it may not impact some dog fooders (is that the right plural?)

It has the potential to crash the calendar app (OOM likely) without this fix.
I have already completed the protocol level of work in our CalDAV repo this just need to be hooked up to the gaia calendar db layer.
Priority: -- → P1
Whiteboard: [LOE:S]
Blocks: 796789
blocking-basecamp: ? → +
Keywords: crash, perf
Attachment #670160 - Flags: review?(mbudzynski)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
I'll try some stress tests here with insanely large calendars from caldav (zimbra probably) and see what happens.
Keywords: verifyme
QA Contact: jsmith
Minusing for qa testing mainly cause the iCal parser will do a huge re-write of this, so it's better to do the stress tests for various accounts when that lands.
Keywords: verifyme
Whiteboard: [LOE:S] → [LOE:S] [qa-]
re 4:

New parser or old this will behave the same way this relies on the CalDAV layer which is totally stable and is expected to only need minor bug fixes if/when we find them.
Ah okay, then I'll stick this back on the testing queue then...
Keywords: verifyme
Whiteboard: [LOE:S] [qa-] → [LOE:S]
Sanity test on google calendar worked fine with some events before the 30 day marker and after the 30 day marker. I'll try another test on yahoo and a caldav calendar to confirm a couple other sanity scenarios.
Looks good on yahoo calendar as well.
Looks okay at a sanity level with using caldav as well. Marking as verified.

As a note - I'll likely do more stress testing on this later when the new iCal parser lands anyways, cause then I can throw larger event sets to see if this implementation still works. At a sanity level though, it looks okay.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Attachment #670160 - Flags: review?(mbudzynski)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: