diff options
author | David Percy <david.percy@mongodb.com> | 2014-09-15 14:44:15 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2014-09-16 12:09:50 -0400 |
commit | 0b167545b6e6a0f8c193d1aab8e094256fc8fa16 (patch) | |
tree | 5c538ead6f077a850b33422b01ba4ccb5848842e /src/mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.cpp | |
parent | 90202295ec60271830464d0f9829a41dfc2a45b1 (diff) | |
download | mongo-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.cpp | 3 |
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; } |