diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 07:53:18 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-04 07:53:18 +0200 |
commit | 9487403a87a93a738955bb9cafd0d12efa295896 (patch) | |
tree | b2660aa0925f1a4f75bc71577b846c5655ee7183 /common/storage/entitystore.cpp | |
parent | 544e08ab379fd53d00009a3400aa530520b65e85 (diff) | |
download | sink-9487403a87a93a738955bb9cafd0d12efa295896.tar.gz sink-9487403a87a93a738955bb9cafd0d12efa295896.zip |
Cleanup
Diffstat (limited to 'common/storage/entitystore.cpp')
-rw-r--r-- | common/storage/entitystore.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 4cb4641..04760f7 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp | |||
@@ -112,7 +112,6 @@ void EntityStore::startTransaction(Sink::Storage::DataStore::AccessMode accessMo | |||
112 | Q_ASSERT(!d->transaction); | 112 | Q_ASSERT(!d->transaction); |
113 | Sink::Storage::DataStore store(Sink::storageLocation(), d->resourceContext.instanceId(), accessMode); | 113 | Sink::Storage::DataStore store(Sink::storageLocation(), d->resourceContext.instanceId(), accessMode); |
114 | d->transaction = store.createTransaction(accessMode); | 114 | d->transaction = store.createTransaction(accessMode); |
115 | Q_ASSERT(d->transaction.validateNamedDatabases()); | ||
116 | } | 115 | } |
117 | 116 | ||
118 | void EntityStore::commitTransaction() | 117 | void EntityStore::commitTransaction() |
@@ -619,29 +618,6 @@ qint64 EntityStore::maxRevision() | |||
619 | return DataStore::maxRevision(d->getTransaction()); | 618 | return DataStore::maxRevision(d->getTransaction()); |
620 | } | 619 | } |
621 | 620 | ||
622 | /* DataStore::Transaction getTransaction() */ | ||
623 | /* { */ | ||
624 | /* Sink::Storage::DataStore::Transaction transaction; */ | ||
625 | /* { */ | ||
626 | /* Sink::Storage::DataStore storage(Sink::storageLocation(), mResourceInstanceIdentifier); */ | ||
627 | /* if (!storage.exists()) { */ | ||
628 | /* //This is not an error if the resource wasn't started before */ | ||
629 | /* SinkLogCtx(d->logCtx) << "Store doesn't exist: " << mResourceInstanceIdentifier; */ | ||
630 | /* return Sink::Storage::DataStore::Transaction(); */ | ||
631 | /* } */ | ||
632 | /* storage.setDefaultErrorHandler([this](const Sink::Storage::DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Error during query: " << error.store << error.message; }); */ | ||
633 | /* transaction = storage.createTransaction(Sink::Storage::DataStore::ReadOnly); */ | ||
634 | /* } */ | ||
635 | |||
636 | /* //FIXME this is a temporary measure to recover from a failure to open the named databases correctly. */ | ||
637 | /* //Once the actual problem is fixed it will be enough to simply crash if we open the wrong database (which we check in openDatabase already). */ | ||
638 | /* while (!transaction.validateNamedDatabases()) { */ | ||
639 | /* Sink::Storage::DataStore storage(Sink::storageLocation(), mResourceInstanceIdentifier); */ | ||
640 | /* transaction = storage.createTransaction(Sink::Storage::DataStore::ReadOnly); */ | ||
641 | /* } */ | ||
642 | /* return transaction; */ | ||
643 | /* } */ | ||
644 | |||
645 | Sink::Log::Context EntityStore::logContext() const | 621 | Sink::Log::Context EntityStore::logContext() const |
646 | { | 622 | { |
647 | return d->logCtx; | 623 | return d->logCtx; |