From 49b83e87e4da54cdd18ec04b10fdb4624389bd80 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 19 Jun 2018 11:00:39 +0200 Subject: Fixed the thread index. * Modifications could result in index changes because we lost the threadId due to remove + add. A modify was necessary (although we can ignore it for the email case). * The ThreadIndexer would try to lookup and potentially index threads for empty parent ids, which is clearly wrong. --- common/storage/entitystore.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common/storage') diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 18c788a..c5b5ffc 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp @@ -283,8 +283,7 @@ bool EntityStore::modify(const QByteArray &type, const ApplicationDomainType &cu { SinkTraceCtx(d->logCtx) << "Modified entity: " << newEntity; - d->typeIndex(type).remove(current.identifier(), current, d->transaction, d->resourceContext.instanceId()); - d->typeIndex(type).add(newEntity.identifier(), newEntity, d->transaction, d->resourceContext.instanceId()); + d->typeIndex(type).modify(newEntity.identifier(), current, newEntity, d->transaction, d->resourceContext.instanceId()); const qint64 newRevision = DataStore::maxRevision(d->transaction) + 1; -- cgit v1.2.3