[Akonadi] [Bug 494249] New: Does not pick up existing files inside a calendar directory when switching database or adding the resource with an existing directory
Martin Steigerwald
bugzilla_noreply at kde.org
Mon Oct 7 17:11:19 BST 2024
https://bugs.kde.org/show_bug.cgi?id=494249
Bug ID: 494249
Summary: Does not pick up existing files inside a calendar
directory when switching database or adding the
resource with an existing directory
Classification: Frameworks and Libraries
Product: Akonadi
Version: 6.2.0
Platform: Debian unstable
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: ICal dir resource
Assignee: kdepim-bugs at kde.org
Reporter: Martin at Lichtvoll.de
CC: carl at carlschwan.eu
Target Milestone: ---
SUMMARY
Akonadi ICal directory resource does not pick up existing files inside a
calendar directory when switching database or adding the resource with an
existing directory.
STEPS TO REPRODUCE
I believe the following should be enough:
1. Add icaldir resource using an existing directory with valid ical files.
OBSERVED RESULT
I switched Akonadi from PostgreSQL to SQLite3 by moving the old database out of
the way, making sure only SQLite3 backend is installed, deleting
akonadiserverrc and starting Akonadi again. Akonadi picked up all the mails
from the existing maildir resource. Akonadi picked up all the contacts. However
calendar directory resource was not even displayed initially. I opened
KOrganizer settings and found the icaldir resource there. After saving the
settings there the ical dir resource "Kalenderordner" (calendar folder) was
displayed but not activated. I activated it. Calendar was empty. I enabled all
logging with
`QT_LOGGING_RULES="*.*=true;qt.*=false" akonadictl restart`
and got:
org.kde.pim.akonadiagentbase: Sending dbus reply for method "" with error
"Ungültigen Eintrag erhalten"
"Ungültigen Eintrag erhalten" => received invalid entry
Odd is that the method is ""
org.kde.pim.akonadiserver: ItemRetrievalJob for request 295 finished with
error: "Unable to retrieve item from resource: Ungültigen Eintrag
erhalten"
a lot of times.
I then removed the icaldir resource and added it again with the same directory.
Same result.
Akonadiconsole also showed no entries, but revealed that the resource has 5630
items.
Finally I emptied the directory and re-imported all ical files with
% calendar-2024-10-07> ls -1 | xargs -n1 konsolekalendar --calendar 446
--import
from a backup, into the right calendar resource as displayed by konsolekalendar
--list-calendars
Took quite a while but it mostly worked. I saw one error, maybe there are a few
others. I intend to review those at some point, but a quick check showed that
appointments I expect are where they should be.
On a subsequent run of akonadictl fsck I got:
% akonadictl fsck
1/19 Looking for collections not belonging to a valid resource...
2/19 Checking collection tree consistency...
3/19 Looking for items not belonging to a valid collection...
Found 5630 orphan items.
Moved orphan items to collection 456
[…]
I am not sure whether that was due to me removing the old resource and
re-adding it or whether this was due to the database switch. But I am pretty
sure that 5630 refers 5630 calendar events. Not sure how I can view this
collection 456 as it is not listed in konsolekalendar --list-calendars and I am
not sure how to access it in Akonadiconsole.
EXPECTED RESULT
As maildir resource, as contacts resource I expect icaldir resource to pick up
valid existing files inside a calendar directory. Remembering that Akonadi is
*mostly* just a cache. Ignoring those files could lead to silent data loss
issues.
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Devuan Ceres (based on Debian unstable) with KDEPIM 24.08
packages from experimental
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
ADDITIONAL INFORMATION
I took the version number from KMail which is 6.2.0. I am not sure how to find
the akonadi_icaldir_resource version number specifically.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list