summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/genericresource.cpp2
-rw-r--r--common/listener.cpp18
-rw-r--r--common/pipeline.cpp39
-rw-r--r--common/resourceaccess.cpp12
-rw-r--r--examples/imapresource/imapresource.cpp2
5 files changed, 35 insertions, 38 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp
index d43eff7..c06c22a 100644
--- a/common/genericresource.cpp
+++ b/common/genericresource.cpp
@@ -114,7 +114,7 @@ private slots:
114 114
115 KAsync::Job<qint64> processQueuedCommand(const Sink::QueuedCommand *queuedCommand) 115 KAsync::Job<qint64> processQueuedCommand(const Sink::QueuedCommand *queuedCommand)
116 { 116 {
117 Log() << "Processing command: " << Sink::Commands::name(queuedCommand->commandId()); 117 Trace() << "Processing command: " << Sink::Commands::name(queuedCommand->commandId());
118 // Throw command into appropriate pipeline 118 // Throw command into appropriate pipeline
119 switch (queuedCommand->commandId()) { 119 switch (queuedCommand->commandId()) {
120 case Sink::Commands::DeleteEntityCommand: 120 case Sink::Commands::DeleteEntityCommand:
diff --git a/common/listener.cpp b/common/listener.cpp
index 6cbf40f..cb974cf 100644
--- a/common/listener.cpp
+++ b/common/listener.cpp
@@ -120,7 +120,7 @@ void Listener::closeAllConnections()
120 120
121void Listener::acceptConnection() 121void Listener::acceptConnection()
122{ 122{
123 Log() << "Accepting connection"; 123 Trace() << "Accepting connection";
124 QLocalSocket *socket = m_server->nextPendingConnection(); 124 QLocalSocket *socket = m_server->nextPendingConnection();
125 125
126 if (!socket) { 126 if (!socket) {
@@ -239,7 +239,7 @@ void Listener::processCommand(int commandId, uint messageId, const QByteArray &c
239 flatbuffers::Verifier verifier((const uint8_t *)commandBuffer.constData(), commandBuffer.size()); 239 flatbuffers::Verifier verifier((const uint8_t *)commandBuffer.constData(), commandBuffer.size());
240 if (Sink::Commands::VerifySynchronizeBuffer(verifier)) { 240 if (Sink::Commands::VerifySynchronizeBuffer(verifier)) {
241 auto buffer = Sink::Commands::GetSynchronize(commandBuffer.constData()); 241 auto buffer = Sink::Commands::GetSynchronize(commandBuffer.constData());
242 Log() << QString("\tSynchronize request (id %1) from %2").arg(messageId).arg(client.name); 242 Trace() << QString("Synchronize request (id %1) from %2").arg(messageId).arg(client.name);
243 auto timer = QSharedPointer<QTime>::create(); 243 auto timer = QSharedPointer<QTime>::create();
244 timer->start(); 244 timer->start();
245 auto job = KAsync::null<void>(); 245 auto job = KAsync::null<void>();
@@ -268,20 +268,20 @@ void Listener::processCommand(int commandId, uint messageId, const QByteArray &c
268 case Sink::Commands::DeleteEntityCommand: 268 case Sink::Commands::DeleteEntityCommand:
269 case Sink::Commands::ModifyEntityCommand: 269 case Sink::Commands::ModifyEntityCommand:
270 case Sink::Commands::CreateEntityCommand: 270 case Sink::Commands::CreateEntityCommand:
271 Log() << "\tCommand id " << messageId << " of type \"" << Sink::Commands::name(commandId) << "\" from " << client.name; 271 Trace() << "Command id " << messageId << " of type \"" << Sink::Commands::name(commandId) << "\" from " << client.name;
272 loadResource()->processCommand(commandId, commandBuffer); 272 loadResource()->processCommand(commandId, commandBuffer);
273 break; 273 break;
274 case Sink::Commands::ShutdownCommand: 274 case Sink::Commands::ShutdownCommand:
275 Log() << QString("\tReceived shutdown command from %1").arg(client.name); 275 Log() << QString("Received shutdown command from %1").arg(client.name);
276 // Immediately reject new connections 276 // Immediately reject new connections
277 m_server->close(); 277 m_server->close();
278 QTimer::singleShot(0, this, &Listener::quit); 278 QTimer::singleShot(0, this, &Listener::quit);
279 break; 279 break;
280 case Sink::Commands::PingCommand: 280 case Sink::Commands::PingCommand:
281 Log() << QString("\tReceived ping command from %1").arg(client.name); 281 Trace() << QString("Received ping command from %1").arg(client.name);
282 break; 282 break;
283 case Sink::Commands::RevisionReplayedCommand: { 283 case Sink::Commands::RevisionReplayedCommand: {
284 Log() << QString("\tReceived revision replayed command from %1").arg(client.name); 284 Trace() << QString("Received revision replayed command from %1").arg(client.name);
285 flatbuffers::Verifier verifier((const uint8_t *)commandBuffer.constData(), commandBuffer.size()); 285 flatbuffers::Verifier verifier((const uint8_t *)commandBuffer.constData(), commandBuffer.size());
286 if (Sink::Commands::VerifyRevisionReplayedBuffer(verifier)) { 286 if (Sink::Commands::VerifyRevisionReplayedBuffer(verifier)) {
287 auto buffer = Sink::Commands::GetRevisionReplayed(commandBuffer.constData()); 287 auto buffer = Sink::Commands::GetRevisionReplayed(commandBuffer.constData());
@@ -292,7 +292,7 @@ void Listener::processCommand(int commandId, uint messageId, const QByteArray &c
292 loadResource()->setLowerBoundRevision(lowerBoundRevision()); 292 loadResource()->setLowerBoundRevision(lowerBoundRevision());
293 } break; 293 } break;
294 case Sink::Commands::RemoveFromDiskCommand: { 294 case Sink::Commands::RemoveFromDiskCommand: {
295 Log() << QString("\tReceived a remove from disk command from %1").arg(client.name); 295 Log() << QString("Received a remove from disk command from %1").arg(client.name);
296 m_resource->removeDataFromDisk(); 296 m_resource->removeDataFromDisk();
297 delete m_resource; 297 delete m_resource;
298 m_resource = nullptr; 298 m_resource = nullptr;
@@ -300,7 +300,7 @@ void Listener::processCommand(int commandId, uint messageId, const QByteArray &c
300 } break; 300 } break;
301 default: 301 default:
302 if (commandId > Sink::Commands::CustomCommand) { 302 if (commandId > Sink::Commands::CustomCommand) {
303 Log() << QString("\tReceived custom command from %1: ").arg(client.name) << commandId; 303 Log() << QString("Received custom command from %1: ").arg(client.name) << commandId;
304 loadResource()->processCommand(commandId, commandBuffer); 304 loadResource()->processCommand(commandId, commandBuffer);
305 } else { 305 } else {
306 success = false; 306 success = false;
@@ -365,7 +365,7 @@ bool Listener::processClientBuffer(Client &client)
365 const QByteArray commandBuffer = client.commandBuffer.left(size); 365 const QByteArray commandBuffer = client.commandBuffer.left(size);
366 client.commandBuffer.remove(0, size); 366 client.commandBuffer.remove(0, size);
367 processCommand(commandId, messageId, commandBuffer, client, [this, messageId, commandId, socket, clientName](bool success) { 367 processCommand(commandId, messageId, commandBuffer, client, [this, messageId, commandId, socket, clientName](bool success) {
368 Log() << QString("\tCompleted command messageid %1 of type \"%2\" from %3").arg(messageId).arg(QString(Sink::Commands::name(commandId))).arg(clientName); 368 Trace() << QString("Completed command messageid %1 of type \"%2\" from %3").arg(messageId).arg(QString(Sink::Commands::name(commandId))).arg(clientName);
369 if (socket) { 369 if (socket) {
370 sendCommandCompleted(socket.data(), messageId, success); 370 sendCommandCompleted(socket.data(), messageId, success);
371 } else { 371 } else {
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index 63a60ce..9813f60 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -63,6 +63,7 @@ public:
63 63
64void Pipeline::Private::storeNewRevision(qint64 newRevision, const flatbuffers::FlatBufferBuilder &fbb, const QByteArray &bufferType, const QByteArray &uid) 64void Pipeline::Private::storeNewRevision(qint64 newRevision, const flatbuffers::FlatBufferBuilder &fbb, const QByteArray &bufferType, const QByteArray &uid)
65{ 65{
66 Trace() << "Committing new revision: " << uid << newRevision;
66 Storage::mainDatabase(transaction, bufferType) 67 Storage::mainDatabase(transaction, bufferType)
67 .write(Storage::assembleKey(uid, newRevision), BufferUtils::extractBuffer(fbb), 68 .write(Storage::assembleKey(uid, newRevision), BufferUtils::extractBuffer(fbb),
68 [uid, newRevision](const Storage::Error &error) { Warning() << "Failed to write entity" << uid << newRevision; }); 69 [uid, newRevision](const Storage::Error &error) { Warning() << "Failed to write entity" << uid << newRevision; });
@@ -121,7 +122,7 @@ void Pipeline::commit()
121 // } 122 // }
122 const auto revision = Storage::maxRevision(d->transaction); 123 const auto revision = Storage::maxRevision(d->transaction);
123 const auto elapsed = d->transactionTime.elapsed(); 124 const auto elapsed = d->transactionTime.elapsed();
124 Trace() << "Committing revision: " << revision << ":" << d->transactionItemCount << " items in: " << Log::TraceTime(elapsed) << " " 125 Log() << "Committing revision: " << revision << ":" << d->transactionItemCount << " items in: " << Log::TraceTime(elapsed) << " "
125 << (double)elapsed / (double)qMax(d->transactionItemCount, 1) << "[ms/item]"; 126 << (double)elapsed / (double)qMax(d->transactionItemCount, 1) << "[ms/item]";
126 if (d->transaction) { 127 if (d->transaction) {
127 d->transaction.commit(); 128 d->transaction.commit();
@@ -145,7 +146,6 @@ Storage &Pipeline::storage() const
145 146
146KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size) 147KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size)
147{ 148{
148 Trace() << "Pipeline: New Entity";
149 d->transactionItemCount++; 149 d->transactionItemCount++;
150 150
151 { 151 {
@@ -159,19 +159,6 @@ KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size)
159 159
160 const bool replayToSource = createEntity->replayToSource(); 160 const bool replayToSource = createEntity->replayToSource();
161 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(createEntity->domainType()->Data()), createEntity->domainType()->size()); 161 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(createEntity->domainType()->Data()), createEntity->domainType()->size());
162 {
163 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size());
164 if (!VerifyEntityBuffer(verifyer)) {
165 Warning() << "invalid buffer, not an entity buffer";
166 return KAsync::error<qint64>(0);
167 }
168 }
169 auto entity = GetEntity(createEntity->delta()->Data());
170 if (!entity->resource()->size() && !entity->local()->size()) {
171 Warning() << "No local and no resource buffer while trying to create entity.";
172 return KAsync::error<qint64>(0);
173 }
174
175 QByteArray key; 162 QByteArray key;
176 if (createEntity->entityId()) { 163 if (createEntity->entityId()) {
177 key = QByteArray(reinterpret_cast<char const *>(createEntity->entityId()->Data()), createEntity->entityId()->size()); 164 key = QByteArray(reinterpret_cast<char const *>(createEntity->entityId()->Data()), createEntity->entityId()->size());
@@ -184,8 +171,22 @@ KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size)
184 if (key.isEmpty()) { 171 if (key.isEmpty()) {
185 key = Sink::Storage::generateUid(); 172 key = Sink::Storage::generateUid();
186 } 173 }
174 Log() << "New Entity. Type: " << bufferType << "uid: "<< key << " replayToSource: " << replayToSource;
187 Q_ASSERT(!key.isEmpty()); 175 Q_ASSERT(!key.isEmpty());
188 176
177 {
178 flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size());
179 if (!VerifyEntityBuffer(verifyer)) {
180 Warning() << "invalid buffer, not an entity buffer";
181 return KAsync::error<qint64>(0);
182 }
183 }
184 auto entity = GetEntity(createEntity->delta()->Data());
185 if (!entity->resource()->size() && !entity->local()->size()) {
186 Warning() << "No local and no resource buffer while trying to create entity.";
187 return KAsync::error<qint64>(0);
188 }
189
189 auto adaptorFactory = Sink::AdaptorFactoryRegistry::instance().getFactory(d->resourceType, bufferType); 190 auto adaptorFactory = Sink::AdaptorFactoryRegistry::instance().getFactory(d->resourceType, bufferType);
190 if (!adaptorFactory) { 191 if (!adaptorFactory) {
191 Warning() << "no adaptor factory for type " << bufferType; 192 Warning() << "no adaptor factory for type " << bufferType;
@@ -214,13 +215,11 @@ KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size)
214 215
215 d->storeNewRevision(newRevision, fbb, bufferType, key); 216 d->storeNewRevision(newRevision, fbb, bufferType, key);
216 217
217 Log() << "Pipeline: wrote entity: " << key << newRevision << bufferType;
218 return KAsync::start<qint64>([newRevision]() { return newRevision; }); 218 return KAsync::start<qint64>([newRevision]() { return newRevision; });
219} 219}
220 220
221KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size) 221KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
222{ 222{
223 Trace() << "Pipeline: Modified Entity";
224 d->transactionItemCount++; 223 d->transactionItemCount++;
225 224
226 { 225 {
@@ -240,9 +239,9 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
240 } 239 }
241 const qint64 baseRevision = modifyEntity->revision(); 240 const qint64 baseRevision = modifyEntity->revision();
242 const bool replayToSource = modifyEntity->replayToSource(); 241 const bool replayToSource = modifyEntity->replayToSource();
243 // TODO rename modifyEntity->domainType to bufferType
244 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(modifyEntity->domainType()->Data()), modifyEntity->domainType()->size()); 242 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(modifyEntity->domainType()->Data()), modifyEntity->domainType()->size());
245 const QByteArray key = QByteArray(reinterpret_cast<char const *>(modifyEntity->entityId()->Data()), modifyEntity->entityId()->size()); 243 const QByteArray key = QByteArray(reinterpret_cast<char const *>(modifyEntity->entityId()->Data()), modifyEntity->entityId()->size());
244 Log() << "Modified Entity. Type: " << bufferType << "uid: "<< key << " replayToSource: " << replayToSource;
246 if (bufferType.isEmpty() || key.isEmpty()) { 245 if (bufferType.isEmpty() || key.isEmpty()) {
247 Warning() << "entity type or key " << bufferType << key; 246 Warning() << "entity type or key " << bufferType << key;
248 return KAsync::error<qint64>(0); 247 return KAsync::error<qint64>(0);
@@ -328,13 +327,11 @@ KAsync::Job<qint64> Pipeline::modifiedEntity(void const *command, size_t size)
328 adaptorFactory->createBuffer(newAdaptor, fbb, metadataFbb.GetBufferPointer(), metadataFbb.GetSize()); 327 adaptorFactory->createBuffer(newAdaptor, fbb, metadataFbb.GetBufferPointer(), metadataFbb.GetSize());
329 328
330 d->storeNewRevision(newRevision, fbb, bufferType, key); 329 d->storeNewRevision(newRevision, fbb, bufferType, key);
331 Log() << "Pipeline: modified entity: " << key << newRevision << bufferType;
332 return KAsync::start<qint64>([newRevision]() { return newRevision; }); 330 return KAsync::start<qint64>([newRevision]() { return newRevision; });
333} 331}
334 332
335KAsync::Job<qint64> Pipeline::deletedEntity(void const *command, size_t size) 333KAsync::Job<qint64> Pipeline::deletedEntity(void const *command, size_t size)
336{ 334{
337 Trace() << "Pipeline: Deleted Entity";
338 d->transactionItemCount++; 335 d->transactionItemCount++;
339 336
340 { 337 {
@@ -349,6 +346,7 @@ KAsync::Job<qint64> Pipeline::deletedEntity(void const *command, size_t size)
349 const bool replayToSource = deleteEntity->replayToSource(); 346 const bool replayToSource = deleteEntity->replayToSource();
350 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(deleteEntity->domainType()->Data()), deleteEntity->domainType()->size()); 347 const QByteArray bufferType = QByteArray(reinterpret_cast<char const *>(deleteEntity->domainType()->Data()), deleteEntity->domainType()->size());
351 const QByteArray key = QByteArray(reinterpret_cast<char const *>(deleteEntity->entityId()->Data()), deleteEntity->entityId()->size()); 348 const QByteArray key = QByteArray(reinterpret_cast<char const *>(deleteEntity->entityId()->Data()), deleteEntity->entityId()->size());
349 Log() << "Deleted Entity. Type: " << bufferType << "uid: "<< key << " replayToSource: " << replayToSource;
352 350
353 bool found = false; 351 bool found = false;
354 bool alreadyRemoved = false; 352 bool alreadyRemoved = false;
@@ -411,7 +409,6 @@ KAsync::Job<qint64> Pipeline::deletedEntity(void const *command, size_t size)
411 [this](const Storage::Error &error) { ErrorMsg() << "Failed to find value in pipeline: " << error.message; }); 409 [this](const Storage::Error &error) { ErrorMsg() << "Failed to find value in pipeline: " << error.message; });
412 410
413 d->storeNewRevision(newRevision, fbb, bufferType, key); 411 d->storeNewRevision(newRevision, fbb, bufferType, key);
414 Log() << "Pipeline: deleted entity: " << newRevision;
415 412
416 for (auto processor : d->processors[bufferType]) { 413 for (auto processor : d->processors[bufferType]) {
417 processor->deletedEntity(key, newRevision, *current, d->transaction); 414 processor->deletedEntity(key, newRevision, *current, d->transaction);
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 5ad2018..d3bd85f 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -230,7 +230,7 @@ KAsync::Job<void> ResourceAccess::Private::initializeSocket()
230ResourceAccess::ResourceAccess(const QByteArray &resourceInstanceIdentifier, const QByteArray &resourceType) 230ResourceAccess::ResourceAccess(const QByteArray &resourceInstanceIdentifier, const QByteArray &resourceType)
231 : ResourceAccessInterface(), d(new Private(resourceType, resourceInstanceIdentifier, this)) 231 : ResourceAccessInterface(), d(new Private(resourceType, resourceInstanceIdentifier, this))
232{ 232{
233 Log() << "Starting access"; 233 Trace() << "Starting access";
234} 234}
235 235
236ResourceAccess::~ResourceAccess() 236ResourceAccess::~ResourceAccess()
@@ -415,7 +415,7 @@ void ResourceAccess::sendCommand(const QSharedPointer<QueuedCommand> &command)
415 // TODO: we should have a timeout for commands 415 // TODO: we should have a timeout for commands
416 d->messageId++; 416 d->messageId++;
417 const auto messageId = d->messageId; 417 const auto messageId = d->messageId;
418 Log() << QString("Sending command \"%1\" with messageId %2").arg(QString(Sink::Commands::name(command->commandId))).arg(d->messageId); 418 Trace() << QString("Sending command \"%1\" with messageId %2").arg(QString(Sink::Commands::name(command->commandId))).arg(d->messageId);
419 Q_ASSERT(command->callback); 419 Q_ASSERT(command->callback);
420 registerCallback(d->messageId, [this, messageId, command](int errorCode, QString errorMessage) { 420 registerCallback(d->messageId, [this, messageId, command](int errorCode, QString errorMessage) {
421 Trace() << "Command complete " << messageId; 421 Trace() << "Command complete " << messageId;
@@ -456,7 +456,7 @@ void ResourceAccess::connected()
456 return; 456 return;
457 } 457 }
458 458
459 Log() << QString("Connected: %1").arg(d->socket->fullServerName()); 459 Trace() << QString("Connected: %1").arg(d->socket->fullServerName());
460 460
461 { 461 {
462 flatbuffers::FlatBufferBuilder fbb; 462 flatbuffers::FlatBufferBuilder fbb;
@@ -533,7 +533,7 @@ bool ResourceAccess::processMessageBuffer()
533 switch (commandId) { 533 switch (commandId) {
534 case Commands::RevisionUpdateCommand: { 534 case Commands::RevisionUpdateCommand: {
535 auto buffer = Commands::GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize); 535 auto buffer = Commands::GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize);
536 Log() << QString("Revision updated to: %1").arg(buffer->revision()); 536 Trace() << QString("Revision updated to: %1").arg(buffer->revision());
537 Notification n; 537 Notification n;
538 n.type = Sink::Commands::NotificationType::NotificationType_RevisionUpdate; 538 n.type = Sink::Commands::NotificationType::NotificationType_RevisionUpdate;
539 emit notification(n); 539 emit notification(n);
@@ -543,7 +543,7 @@ bool ResourceAccess::processMessageBuffer()
543 } 543 }
544 case Commands::CommandCompletionCommand: { 544 case Commands::CommandCompletionCommand: {
545 auto buffer = Commands::GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize); 545 auto buffer = Commands::GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize);
546 Log() << QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully"); 546 Trace() << QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully");
547 547
548 d->completeCommands.insert(buffer->id(), buffer->success()); 548 d->completeCommands.insert(buffer->id(), buffer->success());
549 // The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first 549 // The callbacks can result in this object getting destroyed directly, so we need to ensure we finish our work first
@@ -558,7 +558,7 @@ bool ResourceAccess::processMessageBuffer()
558 close(); 558 close();
559 break; 559 break;
560 case Sink::Commands::NotificationType::NotificationType_Inspection: { 560 case Sink::Commands::NotificationType::NotificationType_Inspection: {
561 Log() << "Received inspection notification."; 561 Trace() << "Received inspection notification.";
562 Notification n; 562 Notification n;
563 if (buffer->identifier()) { 563 if (buffer->identifier()) {
564 // Don't use fromRawData, the buffer is gone once we invoke emit notification 564 // Don't use fromRawData, the buffer is gone once we invoke emit notification
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp
index e01461d..a97f860 100644
--- a/examples/imapresource/imapresource.cpp
+++ b/examples/imapresource/imapresource.cpp
@@ -650,7 +650,7 @@ KAsync::Job<void> ImapResource::inspect(int inspectionType, const QByteArray &in
650 const auto folder = entityStore->read<Sink::ApplicationDomain::Folder>(entityId); 650 const auto folder = entityStore->read<Sink::ApplicationDomain::Folder>(entityId);
651 651
652 if (inspectionType == Sink::ResourceControl::Inspection::CacheIntegrityInspectionType) { 652 if (inspectionType == Sink::ResourceControl::Inspection::CacheIntegrityInspectionType) {
653 Warning() << "Inspecting cache integrity" << remoteId; 653 Log() << "Inspecting cache integrity" << remoteId;
654 654
655 int expectedCount = 0; 655 int expectedCount = 0;
656 Index index("mail.index.folder", transaction); 656 Index index("mail.index.folder", transaction);