summaryrefslogtreecommitdiffstats
path: root/common/changereplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/changereplay.cpp')
-rw-r--r--common/changereplay.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/changereplay.cpp b/common/changereplay.cpp
index d7f46dc..96162b8 100644
--- a/common/changereplay.cpp
+++ b/common/changereplay.cpp
@@ -116,16 +116,15 @@ KAsync::Job<void> ChangeReplay::replayNextRevision()
116 } else { 116 } else {
117 // TODO: should not use internal representations 117 // TODO: should not use internal representations
118 const auto key = Storage::Key(Storage::Identifier::fromDisplayByteArray(uid), revision); 118 const auto key = Storage::Key(Storage::Identifier::fromDisplayByteArray(uid), revision);
119 const auto internalKey = key.toInternalByteArray();
120 const auto displayKey = key.toDisplayByteArray(); 119 const auto displayKey = key.toDisplayByteArray();
121 QByteArray entityBuffer; 120 QByteArray entityBuffer;
122 DataStore::mainDatabase(mMainStoreTransaction, type) 121 DataStore::mainDatabase(mMainStoreTransaction, type)
123 .scan(internalKey, 122 .scan(revision,
124 [&entityBuffer](const QByteArray &key, const QByteArray &value) -> bool { 123 [&entityBuffer](const size_t, const QByteArray &value) -> bool {
125 entityBuffer = value; 124 entityBuffer = value;
126 return false; 125 return false;
127 }, 126 },
128 [this, key](const DataStore::Error &) { SinkErrorCtx(mLogCtx) << "Failed to read the entity buffer " << key; }); 127 [this, key](const DataStore::Error &e) { SinkErrorCtx(mLogCtx) << "Failed to read the entity buffer " << key << "error:" << e; });
129 128
130 if (entityBuffer.isEmpty()) { 129 if (entityBuffer.isEmpty()) {
131 SinkErrorCtx(mLogCtx) << "Failed to replay change " << key; 130 SinkErrorCtx(mLogCtx) << "Failed to replay change " << key;