summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/working_set_common.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-04-24 17:44:20 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-04-26 09:44:01 -0400
commit381a35be63129419516c77825c2a27e7fc447e63 (patch)
tree90285bbc743edac9f5354bd308cc65498cde8d15 /src/mongo/db/exec/working_set_common.cpp
parentbced3d215a395fa2872b9931d971fef7138d3e94 (diff)
downloadmongo-381a35be63129419516c77825c2a27e7fc447e63.tar.gz
SERVER-13632 Get rid of DiskLoc::obj (Part 1)
DiskLoc::obj references the durability subsystem through thread local variables. With this change the accesses become explicit through the collection.
Diffstat (limited to 'src/mongo/db/exec/working_set_common.cpp')
-rw-r--r--src/mongo/db/exec/working_set_common.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/exec/working_set_common.cpp b/src/mongo/db/exec/working_set_common.cpp
index 8b9e07a974c..a0652ea5fc0 100644
--- a/src/mongo/db/exec/working_set_common.cpp
+++ b/src/mongo/db/exec/working_set_common.cpp
@@ -26,6 +26,7 @@
* it in the license file.
*/
+#include "mongo/db/catalog/collection.h"
#include "mongo/db/exec/working_set.h"
#include "mongo/db/exec/working_set_common.h"
#include "mongo/db/pdfile.h"
@@ -33,7 +34,8 @@
namespace mongo {
// static
- bool WorkingSetCommon::fetchAndInvalidateLoc(WorkingSetMember* member) {
+ bool WorkingSetCommon::fetchAndInvalidateLoc(
+ WorkingSetMember* member, const Collection* collection) {
// Already in our desired state.
if (member->state == WorkingSetMember::OWNED_OBJ) { return true; }
@@ -41,7 +43,7 @@ namespace mongo {
if (!member->hasLoc()) { return false; }
// Do the fetch, invalidate the DL.
- member->obj = member->loc.obj().getOwned();
+ member->obj = collection->docFor(member->loc).getOwned();
member->state = WorkingSetMember::OWNED_OBJ;
member->loc = DiskLoc();