diff options
Diffstat (limited to 'src')
7 files changed, 13 insertions, 54 deletions
diff --git a/src/mongo/db/storage/rocks/rocks_btree_impl_test.cpp b/src/mongo/db/storage/rocks/rocks_btree_impl_test.cpp index d89e36967c0..f7102163352 100644 --- a/src/mongo/db/storage/rocks/rocks_btree_impl_test.cpp +++ b/src/mongo/db/storage/rocks/rocks_btree_impl_test.cpp @@ -35,7 +35,7 @@ #include <rocksdb/slice.h> #include <rocksdb/options.h> -#include "mongo/db/operation_context.h" +#include "mongo/db/operation_context_noop.h" #include "mongo/db/storage/rocks/rocks_btree_impl.h" #include "mongo/db/storage/rocks/rocks_record_store.h" #include "mongo/db/storage/rocks/rocks_recovery_unit.h" @@ -45,56 +45,11 @@ using namespace mongo; namespace mongo { - class MyOperationContext : public OperationContext { + class MyOperationContext : public OperationContextNoop { public: - MyOperationContext( rocksdb::DB* db ) { - _recoveryUnit.reset( new RocksRecoveryUnit( db, false ) ); + MyOperationContext( rocksdb::DB* db ) + : OperationContextNoop( new RocksRecoveryUnit( db, false ) ) { } - - virtual ~MyOperationContext() { } - - CurOp* getCurOp() const { - invariant(false); - return NULL; - } - - virtual RecoveryUnit* recoveryUnit() const { - return _recoveryUnit.get(); - } - - virtual LockState* lockState() const { - return NULL; - } - - virtual ProgressMeter* setMessage( const char * msg, - const std::string &name, - unsigned long long progressMeterTotal, - int secondsBetween ) { - invariant(false); - return NULL; - } - - virtual void checkForInterrupt( bool heedMutex ) const { } - - virtual Status checkForInterruptNoAssert() const { - return Status::OK(); - } - - virtual bool isPrimaryFor( const StringData& ns ) { - return true; - } - - virtual const char* getNS() const { - return NULL; - }; - - virtual Transaction* getTransaction() { - return NULL; - } - - private: - boost::scoped_ptr<RocksRecoveryUnit> _recoveryUnit; - }; rocksdb::DB* getDB() { diff --git a/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp b/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp index a60bf4b3e47..5b45242a9ec 100644 --- a/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp +++ b/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp @@ -53,6 +53,11 @@ namespace mongo { _metaDataKey = string("metadata-") + ns.toString(); } + CollectionOptions RocksCollectionCatalogEntry::getCollectionOptions() const { + // todo: put more options in here? + return CollectionOptions(); + } + // ------- indexes ---------- int RocksCollectionCatalogEntry::getTotalIndexCount() const { diff --git a/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.h b/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.h index 706f396cc14..a32387a2da7 100644 --- a/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.h +++ b/src/mongo/db/storage/rocks/rocks_collection_catalog_entry.h @@ -42,6 +42,8 @@ namespace mongo { virtual ~RocksCollectionCatalogEntry(){} + virtual CollectionOptions getCollectionOptions() const; + // ------- indexes ---------- virtual int getTotalIndexCount() const; diff --git a/src/mongo/db/storage/rocks/rocks_database_catalog_entry.cpp b/src/mongo/db/storage/rocks/rocks_database_catalog_entry.cpp index 52b59e20b65..bfc9c25d980 100644 --- a/src/mongo/db/storage/rocks/rocks_database_catalog_entry.cpp +++ b/src/mongo/db/storage/rocks/rocks_database_catalog_entry.cpp @@ -69,7 +69,7 @@ namespace mongo { } CollectionCatalogEntry* RocksDatabaseCatalogEntry::getCollectionCatalogEntry( OperationContext* txn, - const StringData& ns ) { + const StringData& ns ) const { RocksEngine::Entry* entry = _engine->getEntry( ns ); if ( !entry ) return NULL; diff --git a/src/mongo/db/storage/rocks/rocks_database_catalog_entry.h b/src/mongo/db/storage/rocks/rocks_database_catalog_entry.h index ba11681eedf..95b4375b1e8 100644 --- a/src/mongo/db/storage/rocks/rocks_database_catalog_entry.h +++ b/src/mongo/db/storage/rocks/rocks_database_catalog_entry.h @@ -67,7 +67,7 @@ namespace mongo { // The DatabaseCatalogEntry owns this, do not delete virtual CollectionCatalogEntry* getCollectionCatalogEntry( OperationContext* txn, - const StringData& ns ); + const StringData& ns ) const; // The DatabaseCatalogEntry owns this, do not delete virtual RecordStore* getRecordStore( OperationContext* txn, diff --git a/src/mongo/db/storage/rocks/rocks_engine_test.cpp b/src/mongo/db/storage/rocks/rocks_engine_test.cpp index 4ee3207cadb..ba5df1bfb81 100644 --- a/src/mongo/db/storage/rocks/rocks_engine_test.cpp +++ b/src/mongo/db/storage/rocks/rocks_engine_test.cpp @@ -37,9 +37,7 @@ #include "mongo/db/catalog/collection_options.h" #include "mongo/db/index/index_descriptor.h" -#include "mongo/db/operation_context.h" #include "mongo/db/operation_context_noop.h" -#include "mongo/db/storage/record.h" #include "mongo/db/storage/rocks/rocks_collection_catalog_entry.h" #include "mongo/db/storage/rocks/rocks_engine.h" #include "mongo/db/storage/rocks/rocks_record_store.h" diff --git a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp index 5742211be48..119aacb565e 100644 --- a/src/mongo/db/storage/rocks/rocks_record_store_test.cpp +++ b/src/mongo/db/storage/rocks/rocks_record_store_test.cpp @@ -37,7 +37,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/operation_context_noop.h" -#include "mongo/db/storage/record.h" #include "mongo/db/storage/rocks/rocks_record_store.h" #include "mongo/db/storage/rocks/rocks_recovery_unit.h" #include "mongo/unittest/unittest.h" |