summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHari Khalsa <hkhalsa@10gen.com>2014-05-15 11:04:20 -0400
committerHari Khalsa <hkhalsa@10gen.com>2014-05-15 11:04:20 -0400
commit94210925c7e7fa6ff5f7d0b1e668512edddc3d1e (patch)
tree8f7a270b64dca37519c3727dd3ae6f4888211510
parent1b218e1f1ca73f8d373d54b59f6137e167345997 (diff)
downloadmongo-94210925c7e7fa6ff5f7d0b1e668512edddc3d1e.tar.gz
SERVER-13641 fix build by fixing dummy record store/txn
-rw-r--r--src/mongo/db/structure/record_store_v1_test_help.cpp28
-rw-r--r--src/mongo/db/structure/record_store_v1_test_help.h27
2 files changed, 35 insertions, 20 deletions
diff --git a/src/mongo/db/structure/record_store_v1_test_help.cpp b/src/mongo/db/structure/record_store_v1_test_help.cpp
index 822462c6d30..486251821ff 100644
--- a/src/mongo/db/structure/record_store_v1_test_help.cpp
+++ b/src/mongo/db/structure/record_store_v1_test_help.cpp
@@ -40,30 +40,34 @@
#include "mongo/unittest/unittest.h"
namespace mongo {
- bool DummyTransactionExperiment::commitIfNeeded( bool force ) {
+
+ bool DummyRecoveryUnit::commitIfNeeded( bool force ) {
return false;
}
- bool DummyTransactionExperiment::isCommitNeeded() const {
+ bool DummyRecoveryUnit::isCommitNeeded() const {
return false;
}
- ProgressMeter* DummyTransactionExperiment::setMessage(const char* msg,
- const std::string& name ,
- unsigned long long progressMeterTotal,
- int secondsBetween) {
- invariant( false );
+ void* DummyRecoveryUnit::writingPtr(void* data, size_t len) {
+ return data;
}
- void* DummyTransactionExperiment::writingPtr(void* data, size_t len) {
- return data;
+ void DummyRecoveryUnit::createdFile(const std::string& filename, unsigned long long len) {
}
- void DummyTransactionExperiment::createdFile(const std::string& filename,
- unsigned long long len) {
+ void DummyRecoveryUnit::syncDataAndTruncateJournal() {
}
- void DummyTransactionExperiment::syncDataAndTruncateJournal() {
+ DummyTransactionExperiment::DummyTransactionExperiment() {
+ _recoveryUnit.reset(new DummyRecoveryUnit());
+ }
+
+ ProgressMeter* DummyTransactionExperiment::setMessage(const char* msg,
+ const std::string& name ,
+ unsigned long long progressMeterTotal,
+ int secondsBetween) {
+ invariant( false );
}
void DummyTransactionExperiment::checkForInterrupt(bool heedMutex ) const {
diff --git a/src/mongo/db/structure/record_store_v1_test_help.h b/src/mongo/db/structure/record_store_v1_test_help.h
index 38abc05bcff..55feadb449f 100644
--- a/src/mongo/db/structure/record_store_v1_test_help.h
+++ b/src/mongo/db/structure/record_store_v1_test_help.h
@@ -38,29 +38,40 @@
namespace mongo {
- class DummyTransactionExperiment : public TransactionExperiment {
+ class DummyRecoveryUnit : public RecoveryUnit {
public:
- virtual ~DummyTransactionExperiment(){}
-
virtual bool commitIfNeeded(bool force = false);
virtual bool isCommitNeeded() const;
- virtual ProgressMeter* setMessage(const char* msg,
- const std::string& name ,
- unsigned long long progressMeterTotal,
- int secondsBetween);
-
virtual void* writingPtr(void* data, size_t len);
virtual void createdFile(const std::string& filename, unsigned long long len);
virtual void syncDataAndTruncateJournal();
+ };
+
+ class DummyTransactionExperiment : public TransactionExperiment {
+ public:
+ DummyTransactionExperiment();
+
+ virtual ~DummyTransactionExperiment() { }
+
+ virtual RecoveryUnit* recoveryUnit() const {
+ return _recoveryUnit.get();
+ }
+
+ virtual ProgressMeter* setMessage(const char* msg,
+ const std::string& name ,
+ unsigned long long progressMeterTotal,
+ int secondsBetween);
virtual void checkForInterrupt(bool heedMutex = true) const;
virtual Status checkForInterruptNoAssert() const;
+ private:
+ boost::scoped_ptr<DummyRecoveryUnit> _recoveryUnit;
};
class DummyRecordStoreV1MetaData : public RecordStoreV1MetaData {