Bug 326846 - DAV resource requests ALL calendar data without a [comp-filter] set
Summary: DAV resource requests ALL calendar data without a [comp-filter] set
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: 4.11
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 18:59 UTC by Ingo Ratsdorf
Modified: 2014-09-01 12:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Ratsdorf 2013-10-29 18:59:44 UTC
You set up a CalDAV resource and wait and wait and wait, .....
The calendar server log files show that the DAV resource is requesting ALL calendar data without a [comp-filter][time-range] set.
This is going to request ALL available VEvent data for all the acessible calendars, in my case 5 shared calendars with 6 years of data, some 20,000 events....
The server will be working for hours.

Reproducible: Always

Steps to Reproduce:
1. set up a CalDAV resource
2. wait
3. watch server logs
Actual Results:  
Server chokes up, apache2 processes have to be killed, resource deleted again

Expected Results:  
A subset of events from each calendar to be requested, ie last 3 months and fiture events, like other calendar clients do. iPhone works fine with server, Thunderbird/Lighning works fine, EMClient works fine, even iCal.
Just not KDE DAV.

The dav request the KDE DAV resource is sending to the server:

<?xml version="1.0" encoding="utf-8"?>
<calendar-query xmlns="urn:ietf:params:xml:ns:caldav">
 <prop xmlns="DAV:">
  <getetag xmlns="DAV:"/>
  <resourcetype xmlns="DAV:"/>
 </prop>
 <filter xmlns="urn:ietf:params:xml:ns:caldav">
  <comp-filter xmlns="urn:ietf:params:xml:ns:caldav" name="VCALENDAR">
   <comp-filter xmlns="urn:ietf:params:xml:ns:caldav" name="VEVENT"/>
  </comp-filter>
 </filter>
</calendar-query>

While I realise that some server may not support [time-range], I also wonder whether it is wise to request all data and rely on the server to make some educated guess on whether that would be good or not...
Of course the server could be changed to only return sensible amount of data, too...
Comment 1 Ingo Ratsdorf 2014-06-02 21:22:31 UTC
Bug is now several month old. Is anyone working n the DAV resource?
This is a major flaw that renders the resource almost unusable.
Just image the amount of data that needs transfering - I have 8 years of data in my calendar and that's just one of 5....
Comment 2 Grégory Oestreicher 2014-09-01 12:52:23 UTC
Git commit f488ed529caf572deae055a3af4cd6ba716f2539 by Grégory Oestreicher.
Committed on 01/09/2014 at 12:51.
Pushed by goestreicher into branch 'KDE/4.14'.

Only fetch events for the last 3 months

M  +25   -0    resources/dav/protocols/caldavprotocol.cpp

http://commits.kde.org/kdepim-runtime/f488ed529caf572deae055a3af4cd6ba716f2539
Comment 3 Grégory Oestreicher 2014-09-01 12:54:55 UTC
Forgot the fixed-in line in the commit.

Note that actually the 3 months limit is hard-coded in the resource. I'd like to add a configurable limit in the configuration in the future, but it's not top-priority.

Cheers,
Grégory