summaryrefslogtreecommitdiffstats
path: root/common/datastorequery.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-06-22 17:46:57 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-06-22 17:46:57 +0200
commited17c92c9f3be95e9b280f2abc67f1c0ba48e8c4 (patch)
treed65e4a0a27fd851adf3d4d44e5beccb17f2fe7a6 /common/datastorequery.cpp
parentd52dc4cfb2cb219aa2db25ae6e201b21bbc3079f (diff)
downloadsink-ed17c92c9f3be95e9b280f2abc67f1c0ba48e8c4.tar.gz
sink-ed17c92c9f3be95e9b280f2abc67f1c0ba48e8c4.zip
Try harder to avoid storing a revision that is too high in the result
set. We might miss some updates. This should not normally ever happen if we assume that we have a transaction from start to finish of the query (the maxRevision() call should be equivalent. We do have some cornercases in our lmdb implementation that breaks transactions when new databases are opened, so we try to be extra safe this way.... Let's see if it works.
Diffstat (limited to 'common/datastorequery.cpp')
-rw-r--r--common/datastorequery.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp
index 0195cfc..fd910f8 100644
--- a/common/datastorequery.cpp
+++ b/common/datastorequery.cpp
@@ -665,7 +665,7 @@ QVector<QByteArray> DataStoreQuery::loadIncrementalResultSet(qint64 baseRevision
665 665
666ResultSet DataStoreQuery::update(qint64 baseRevision) 666ResultSet DataStoreQuery::update(qint64 baseRevision)
667{ 667{
668 SinkTraceCtx(mLogCtx) << "Executing query update from revision " << baseRevision; 668 SinkTraceCtx(mLogCtx) << "Executing query update from revision " << baseRevision << " to revision " << mStore.maxRevision();
669 auto incrementalResultSet = loadIncrementalResultSet(baseRevision); 669 auto incrementalResultSet = loadIncrementalResultSet(baseRevision);
670 SinkTraceCtx(mLogCtx) << "Incremental changes: " << incrementalResultSet; 670 SinkTraceCtx(mLogCtx) << "Incremental changes: " << incrementalResultSet;
671 mSource->add(incrementalResultSet); 671 mSource->add(incrementalResultSet);