summaryrefslogtreecommitdiffstats
path: root/common/index.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-06-19 11:00:39 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-06-19 12:27:01 +0200
commit49b83e87e4da54cdd18ec04b10fdb4624389bd80 (patch)
treed87a11bcb14e6ef3811df53c06aeb1726616a26c /common/index.cpp
parentb940489ed6afe413339a1c602d05f3b4f3133463 (diff)
downloadsink-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/index.cpp')
-rw-r--r--common/index.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/index.cpp b/common/index.cpp
index 13ca6ed..86a2dd5 100644
--- a/common/index.cpp
+++ b/common/index.cpp
@@ -2,6 +2,14 @@
2 2
3#include "log.h" 3#include "log.h"
4 4
5Index::Index(const QString &storageRoot, const QString &dbName, const QString &indexName, Sink::Storage::DataStore::AccessMode mode)
6 : mTransaction(Sink::Storage::DataStore(storageRoot, dbName, mode).createTransaction(mode)),
7 mDb(mTransaction.openDatabase(indexName.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)),
8 mName(indexName),
9 mLogCtx("index." + indexName.toLatin1())
10{
11}
12
5Index::Index(const QString &storageRoot, const QString &name, Sink::Storage::DataStore::AccessMode mode) 13Index::Index(const QString &storageRoot, const QString &name, Sink::Storage::DataStore::AccessMode mode)
6 : mTransaction(Sink::Storage::DataStore(storageRoot, name, mode).createTransaction(mode)), 14 : mTransaction(Sink::Storage::DataStore(storageRoot, name, mode).createTransaction(mode)),
7 mDb(mTransaction.openDatabase(name.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)), 15 mDb(mTransaction.openDatabase(name.toLatin1(), std::function<void(const Sink::Storage::DataStore::Error &)>(), true)),