diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-19 11:00:39 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-06-19 12:27:01 +0200 |
commit | 49b83e87e4da54cdd18ec04b10fdb4624389bd80 (patch) | |
tree | d87a11bcb14e6ef3811df53c06aeb1726616a26c /common/storage/entitystore.cpp | |
parent | b940489ed6afe413339a1c602d05f3b4f3133463 (diff) | |
download | sink-49b83e87e4da54cdd18ec04b10fdb4624389bd80.tar.gz sink-49b83e87e4da54cdd18ec04b10fdb4624389bd80.zip |
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.
Diffstat (limited to 'common/storage/entitystore.cpp')
-rw-r--r-- | common/storage/entitystore.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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 | |||
283 | { | 283 | { |
284 | SinkTraceCtx(d->logCtx) << "Modified entity: " << newEntity; | 284 | SinkTraceCtx(d->logCtx) << "Modified entity: " << newEntity; |
285 | 285 | ||
286 | d->typeIndex(type).remove(current.identifier(), current, d->transaction, d->resourceContext.instanceId()); | 286 | d->typeIndex(type).modify(newEntity.identifier(), current, newEntity, d->transaction, d->resourceContext.instanceId()); |
287 | d->typeIndex(type).add(newEntity.identifier(), newEntity, d->transaction, d->resourceContext.instanceId()); | ||
288 | 287 | ||
289 | const qint64 newRevision = DataStore::maxRevision(d->transaction) + 1; | 288 | const qint64 newRevision = DataStore::maxRevision(d->transaction) + 1; |
290 | 289 | ||