Page MenuHomekolab.org

Error while updating search collection
Closed, WontfixPublic

Description

akonadiserver(2893) SearchPlugin::search: Got 26 results
searchUpdateResultsAvailable 1577 26 results
Got 26 results, out of which 11 are already in the collection
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionpimitemrelation`, CONSTRAINT `collectionpimitemrelation_ibfk
_2` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionpimitemrelation`, CONSTRAINT `collectionpimitemrelation_ibf
k_2` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id) VALUES (:0, :1)"
Error during adding a record to table "CollectionPimItemRelation" "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionpimit
emrelation`, CONSTRAINT `collectionpimitemrelation_ibfk_2` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMY
SQL3: Unable to execute statement"
DATABASE ERROR:
Error code: 1452
DB error:  "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionpimitemrelation`, CONSTRAINT `collectionpimitemrelation_ibfk
_2` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)"
Error text: "Cannot add or update a child row: a foreign key constraint fails (`akonadi`.`collectionpimitemrelation`, CONSTRAINT `collectionpimitemrelation_ibf
k_2` FOREIGN KEY (`PimItem_id`) REFERENCES `pimitemtable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) QMYSQL3: Unable to execute statement"
Query: "INSERT INTO CollectionPimItemRelation (Collection_id, PimItem_id) VALUES (:0, :1)"
Error during adding a record to table "C

Doesn't seem to have any direct impact on functionality

Details

Differential Revisions
D150: Prepare fix - Error while updating search collection
Ticket Type
Task

Event Timeline

mollekopf moved this task from Backlog to Need Resolution on the KDE PIM board.Apr 29 2016, 11:22 AM

only for triaging it.

knauss moved this task from Backlog to Doing on the Sprint 201618 board.May 2 2016, 10:44 AM
knauss moved this task from Doing to Review on the Sprint 201618 board.May 2 2016, 12:11 PM
knauss added a subscriber: knauss.

The theorie I have is:

  • baloo returns items, that are not valid anymore in PimItem, but akonadi tries to add them to the search collection and this fails fo the constrain.

Got 26 results, out of which 11 are already in the collection

sounds like 11 items are invalid
--> the problem is surly located inside SearchManager::searchUpdateResultsAvailable
--> the problem is located before qDebug() << "Added" << newItems.count();

and the only part what adds items is the foreach loop that adds PimItems to the relation collection.

I now created a patch D150 that prints out the items, that are not valid anymore in PimItem.
The propper patch to find out, why baloo does not deleted these references.
But first we should verify, that it is the correct theorie :D

akonadiserver(17913) SearchPlugin::search: Got 0 results
searchUpdateResultsAvailable 1578 0 results
Got 0 results, out of which 0 are already in the collection
DATABASE ERROR:
Error code: 1064
DB error:  "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') )' at line 1"
Error text: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') )' at line 1 QMYSQL: Unable to execute query"
Query: "SELECT PimItemTable.id, PimItemTable.rev, PimItemTable.remoteId, PimItemTable.remoteRevision, PimItemTable.gid, PimItemTable.collectionId, PimItemTable.mimeTypeId, PimItemTable.datetime, PimItemTable.atime, PimItemTable.dirty, PimItemTable.size FROM PimItemTable WHERE ( PimItemTable.id IN (  ) )"
Reestablishing the connection
Not reestablishing the connection.  -1 false 140415541954304
Search done "searchUpdate-1462287694" (without remote search)
Search update finished
All results: 0
Removed results: 0
Executing search "searchUpdate-1462287694"
akonadiserver(17913) SearchPlugin::search: Got 11512 results
searchUpdateResultsAvailable 131 11512 results
Got 11512 results, out of which 11503 are already in the collection
Added 9
Search done "searchUpdate-1462287694" (without remote search)
Search update finished
All results: 11512
Removed results: 0
Executing search "searchUpdate-1462287694"
akonadiserver(17913) SearchPlugin::search: Got 26 results
searchUpdateResultsAvailable 1577 26 results
Got 26 results, out of which 11 are already in the collection
Added 0
Could not add items to search collection, because their item do not exist anymore in PimItem table: QSet(1747991, 1747917, 1747993, 1747976, 1747979, 1747980, 1747981, 1747945, 1747946, 1747983, 1747984, 1747985, 1747986, 1747989, 1747916)
Search done "searchUpdate-1462287694" (without remote search)
Search update finished
All results: 26
Removed results: 0
mollekopf reassigned this task from mollekopf to knauss.May 4 2016, 11:52 AM
petersen moved this task from Backlog to Review on the Sprint 201619 board.May 9 2016, 9:19 AM
mollekopf moved this task from Review to Backlog on the Sprint 201619 board.May 9 2016, 11:45 AM
knauss moved this task from Backlog to Done on the Sprint 201619 board.May 13 2016, 1:57 PM
knauss moved this task from Need Resolution to Backlog on the KDE PIM board.May 13 2016, 2:00 PM
machniak closed this task as Wontfix.Jul 16 2019, 11:43 AM
machniak added a subscriber: machniak.

Kolab support for KDE PIM is discontinued. Create a ticket on https://bugs.kde.org