summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbhelpers.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2014-11-26 15:04:26 -0500
committerMathias Stearn <mathias@10gen.com>2014-11-26 15:15:59 -0500
commit16a8ef7ad60d498b69bdc0ad5cbca44757d16fd8 (patch)
tree2d9f056acf8f1b9b2e943f82e315bdf019475a38 /src/mongo/db/dbhelpers.cpp
parentcb5cab88761d9aca75e064665cce89f579c69e36 (diff)
downloadmongo-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/db/dbhelpers.cpp')
-rw-r--r--src/mongo/db/dbhelpers.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp
index 3aeb2d6b875..ad9e5c60a15 100644
--- a/src/mongo/db/dbhelpers.cpp
+++ b/src/mongo/db/dbhelpers.cpp
@@ -104,7 +104,7 @@ namespace mongo {
const BSONObj &query,
BSONObj& result,
bool requireIndex) {
- DiskLoc loc = findOne( txn, collection, query, requireIndex );
+ RecordId loc = findOne( txn, collection, query, requireIndex );
if ( loc.isNull() )
return false;
result = collection->docFor(txn, loc);
@@ -114,12 +114,12 @@ namespace mongo {
/* fetch a single object from collection ns that matches query
set your db SavedContext first
*/
- DiskLoc Helpers::findOne(OperationContext* txn,
+ RecordId Helpers::findOne(OperationContext* txn,
Collection* collection,
const BSONObj &query,
bool requireIndex) {
if ( !collection )
- return DiskLoc();
+ return RecordId();
CanonicalQuery* cq;
const WhereCallbackReal whereCallback(txn, collection->ns().db());
@@ -139,11 +139,11 @@ namespace mongo {
auto_ptr<PlanExecutor> exec(rawExec);
PlanExecutor::ExecState state;
- DiskLoc loc;
+ RecordId loc;
if (PlanExecutor::ADVANCED == (state = exec->getNext(NULL, &loc))) {
return loc;
}
- return DiskLoc();
+ return RecordId();
}
bool Helpers::findById(OperationContext* txn,
@@ -177,14 +177,14 @@ namespace mongo {
BtreeBasedAccessMethod* accessMethod =
static_cast<BtreeBasedAccessMethod*>(catalog->getIndex( desc ));
- DiskLoc loc = accessMethod->findSingle( txn, query["_id"].wrap() );
+ RecordId loc = accessMethod->findSingle( txn, query["_id"].wrap() );
if ( loc.isNull() )
return false;
result = collection->docFor( txn, loc );
return true;
}
- DiskLoc Helpers::findById(OperationContext* txn,
+ RecordId Helpers::findById(OperationContext* txn,
Collection* collection,
const BSONObj& idquery) {
verify(collection);
@@ -388,7 +388,7 @@ namespace mongo {
InternalPlanner::IXSCAN_FETCH));
exec->setYieldPolicy(PlanExecutor::YIELD_AUTO);
- DiskLoc rloc;
+ RecordId rloc;
BSONObj obj;
PlanExecutor::ExecState state;
// This may yield so we cannot touch nsd after this.
@@ -497,7 +497,7 @@ namespace mongo {
Status Helpers::getLocsInRange( OperationContext* txn,
const KeyRange& range,
long long maxChunkSizeBytes,
- set<DiskLoc>* locs,
+ set<RecordId>* locs,
long long* numDocs,
long long* estChunkSizeBytes )
{
@@ -556,7 +556,7 @@ namespace mongo {
// already being queued and will be migrated in the 'transferMods' stage
exec->setYieldPolicy(PlanExecutor::YIELD_AUTO);
- DiskLoc loc;
+ RecordId loc;
PlanExecutor::ExecState state;
while (PlanExecutor::ADVANCED == (state = exec->getNext(NULL, &loc))) {
if ( !isLargeChunk ) {