[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Collections without remoteId abort imap sync
From:       Volker Krause <vkrause () kde ! org>
Date:       2012-03-10 16:26:09
Message-ID: 1370640.NEGHO1qDXK () vkpc9
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


should be fixed in current master for resources using hierarchical remote ids 
(e.g. IMAP, maildir).

regards,
Volker

On Sunday 19 February 2012 11:08:17 David Faure wrote:
> My IMAP sync has been broken for a long time, due to errors like this one:
> 
> 
> Error during executing query "INSERT INTO CollectionTable (remoteId,
> remoteRevision, name, parentId, resourceId, cachePolicyInherit) VALUES (:0,
> 
> :1, :2, :3, :4, :5)" :  "Duplicate entry '960-trainings-old' for key
> 
> 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute statement"
> 
> Volker told me to look for a collection without a remoteId, in the
> CollectionTable, and he was right, that's exactly the issue.
> 
> id 2551, remoteId empty, remoteRevision empty, name trainings-old, parentId
> 960 (which is correct), resourceId 22.
> 
> Shouldn't akonadiserver detect that and use "UPDATE" when a collection with
> this name already exists?
> 
> The code in server/src/storage/datastore.cpp thinks otherwise:
> 
> 247│
> 248│ /* --- Collection ---------------------------------------------------
> */ 249│ bool DataStore::appendCollection( Collection &collection )
> 250│ {
> 251│   // no need to check for already existing collection with the same
> name, 252│   // a unique index on parent + name prevents that in the
> database 253├>  if ( !collection.insert() )
> 254│     return false;
> 255│
> 256│   mNotificationCollector->collectionAdded( collection );
> 257│   return true;
> 258│ }
> 
> (This is the insert that fails)
> 
> Of course I could just clean up my SQL table from such ghost collections,
> but I suppose a proper recovery code path would be more useful for other
> users in the same situation who don't have the opportunity of spending a
> weekend in Osnabrueck to get such answers about their problems :-)
> 
> Any idea how this could happen in the first place, too?
["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic