summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2014-09-15 14:44:15 -0400
committerGeert Bosch <geert@mongodb.com>2014-09-16 12:09:50 -0400
commit0b167545b6e6a0f8c193d1aab8e094256fc8fa16 (patch)
tree5c538ead6f077a850b33422b01ba4ccb5848842e /src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp
parent90202295ec60271830464d0f9829a41dfc2a45b1 (diff)
downloadmongo-0b167545b6e6a0f8c193d1aab8e094256fc8fa16.tar.gz
SERVER-15187 Add OperationContext parameter to restoreState
Storage engines might need the current OperationContext to restore their state. For example, BDBRecordIterator needs access to the current underlying transaction to recreate an underlying cursor. Having the BDBRecordIterator save a pointer to the OperationContext it was created with won't work, because the OperationContext is destroyed and a new one created between saveState and restoreState.
Diffstat (limited to 'src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp')
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp
index 20122fea94d..c7b5c1fa18c 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp
@@ -118,7 +118,8 @@ namespace mongo {
void SimpleRecordStoreV1Iterator::saveState() {
}
- bool SimpleRecordStoreV1Iterator::restoreState() {
+ bool SimpleRecordStoreV1Iterator::restoreState(OperationContext* txn) {
+ _txn = txn;
// if the collection is dropped, then the cursor should be destroyed
return true;
}