From 9a5f0a14714ec9a6a71a003b72e5ed3520dfa125 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 19 Oct 2016 16:15:23 +0200 Subject: Removed the whole revision cleanup into the entitystore --- common/genericresource.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'common/genericresource.cpp') diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 8f08f3d..39bd39e 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp @@ -57,12 +57,8 @@ class CommandProcessor : public QObject SINK_DEBUG_AREA("commandprocessor") public: - CommandProcessor(Sink::Pipeline *pipeline, QList commandQueues) : QObject(), mPipeline(pipeline), mCommandQueues(commandQueues), mProcessingLock(false) + CommandProcessor(Sink::Pipeline *pipeline, QList commandQueues) : QObject(), mPipeline(pipeline), mCommandQueues(commandQueues), mProcessingLock(false), mLowerBoundRevision(0) { - mPipeline->startTransaction(); - mLowerBoundRevision = mPipeline->revision(); - mPipeline->commit(); - for (auto queue : mCommandQueues) { const bool ret = connect(queue, &MessageQueue::messageReady, this, &CommandProcessor::process); Q_UNUSED(ret); @@ -191,10 +187,7 @@ private slots: auto time = QSharedPointer::create(); time->start(); mPipeline->startTransaction(); - SinkTrace() << "Cleaning up from " << mPipeline->cleanedUpRevision() + 1 << " to " << mLowerBoundRevision; - for (qint64 revision = mPipeline->cleanedUpRevision() + 1; revision <= mLowerBoundRevision; revision++) { - mPipeline->cleanupRevision(revision); - } + mPipeline->cleanupRevisions(mLowerBoundRevision); mPipeline->commit(); SinkTrace() << "Cleanup done." << Log::TraceTime(time->elapsed()); @@ -280,7 +273,6 @@ GenericResource::GenericResource(const ResourceContext &resourceContext, const Q auto ret = QObject::connect(mPipeline.data(), &Pipeline::revisionUpdated, this, &Resource::revisionUpdated); Q_ASSERT(ret); } - mClientLowerBoundRevision = mPipeline->cleanedUpRevision(); mCommitQueueTimer.setInterval(sCommitInterval); mCommitQueueTimer.setSingleShot(true); -- cgit v1.2.3