diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-11-26 15:04:26 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-11-26 15:15:59 -0500 |
commit | 16a8ef7ad60d498b69bdc0ad5cbca44757d16fd8 (patch) | |
tree | 2d9f056acf8f1b9b2e943f82e315bdf019475a38 /src/mongo/dbtests/indexupdatetests.cpp | |
parent | cb5cab88761d9aca75e064665cce89f579c69e36 (diff) | |
download | mongo-16a8ef7ad60d498b69bdc0ad5cbca44757d16fd8.tar.gz |
SERVER-13679 Replace DiskLoc with RecordId outside of MMAPv1
Operations:
sed -i -e 's/\<DiskLoc\>/RecordId/g'
sed -i -e 's/\<DiskLocs\>/RecordIds/g'
sed -i -e 's/\<minDiskLoc\>/RecordId::min()/g'
sed -i -e 's/\<maxDiskLoc\>/RecordId::max()/g'
sed -i -e 's/\<getDiskLoc\>/getRecordId/g''
Changes under mmap_v1 were reverted and redone by hand as needed.
Diffstat (limited to 'src/mongo/dbtests/indexupdatetests.cpp')
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index 1b43af2a093..504d04c528a 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -77,7 +77,7 @@ namespace IndexUpdateTests { "name" << "a_1" ); int32_t lenWHdr = indexInfo.objsize() + Record::HeaderSize; const char* systemIndexes = "unittests.system.indexes"; - DiskLoc infoLoc = allocateSpaceForANewRecord( systemIndexes, + RecordId infoLoc = allocateSpaceForANewRecord( systemIndexes, nsdetails( systemIndexes ), lenWHdr, false ); @@ -216,12 +216,12 @@ namespace IndexUpdateTests { // Add index keys to the phaseOne. int32_t nKeys = 130; for( int32_t i = 0; i < nKeys; ++i ) { - phaseOne.sorter->add( BSON( "a" << i ), /* dummy disk loc */ DiskLoc(), false ); + phaseOne.sorter->add( BSON( "a" << i ), /* dummy disk loc */ RecordId(), false ); } phaseOne.nkeys = phaseOne.n = nKeys; phaseOne.sorter->sort( false ); // Set up remaining arguments. - set<DiskLoc> dups; + set<RecordId> dups; CurOp* op = txn.getCurOp(); ProgressMeterHolder pm (op->setMessage("BuildBottomUp", "BuildBottomUp Progress", @@ -282,12 +282,12 @@ namespace IndexUpdateTests { int32_t nKeys = 130; // Add index keys to the phaseOne. for( int32_t i = 0; i < nKeys; ++i ) { - phaseOne.sorter->add( BSON( "a" << i ), /* dummy disk loc */ DiskLoc(), false ); + phaseOne.sorter->add( BSON( "a" << i ), /* dummy disk loc */ RecordId(), false ); } phaseOne.nkeys = phaseOne.n = nKeys; phaseOne.sorter->sort( false ); // Set up remaining arguments. - set<DiskLoc> dups; + set<RecordId> dups; CurOp* op = txn.getCurOp(); ProgressMeterHolder pm (op->setMessage("InterruptBuildBottomUp", "InterruptBuildBottomUp Progress", @@ -417,17 +417,17 @@ namespace IndexUpdateTests { // Create a new collection. Database* db = _ctx.ctx().db(); Collection* coll; - DiskLoc loc1; - DiskLoc loc2; + RecordId loc1; + RecordId loc2; { WriteUnitOfWork wunit(&_txn); db->dropCollection( &_txn, _ns ); coll = db->createCollection( &_txn, _ns ); - StatusWith<DiskLoc> swLoc1 = coll->insertDocument(&_txn, + StatusWith<RecordId> swLoc1 = coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << "dup"), true); - StatusWith<DiskLoc> swLoc2 = coll->insertDocument(&_txn, + StatusWith<RecordId> swLoc2 = coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << "dup"), true); ASSERT_OK(swLoc1.getStatus()); @@ -450,7 +450,7 @@ namespace IndexUpdateTests { ASSERT_OK(indexer.init(spec)); - std::set<DiskLoc> dups; + std::set<RecordId> dups; ASSERT_OK(indexer.insertAllDocumentsInCollection(&dups)); // either loc1 or loc2 should be in dups but not both. @@ -668,7 +668,7 @@ namespace IndexUpdateTests { "name" << name ); int32_t lenWHdr = indexInfo.objsize() + Record::HeaderSize; const char* systemIndexes = "unittests.system.indexes"; - DiskLoc infoLoc = allocateSpaceForANewRecord( systemIndexes, + RecordId infoLoc = allocateSpaceForANewRecord( systemIndexes, nsdetails( systemIndexes ), lenWHdr, false ); |