diff options
Diffstat (limited to 'src/mongo/db/repl/local_oplog_info.cpp')
-rw-r--r-- | src/mongo/db/repl/local_oplog_info.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/local_oplog_info.cpp b/src/mongo/db/repl/local_oplog_info.cpp index 01f48ac47b5..e73199c00db 100644 --- a/src/mongo/db/repl/local_oplog_info.cpp +++ b/src/mongo/db/repl/local_oplog_info.cpp @@ -81,16 +81,16 @@ void LocalOplogInfo::setOplogCollectionName(ServiceContext* service) { } } -const Collection* LocalOplogInfo::getCollection() const { +const CollectionPtr& LocalOplogInfo::getCollection() const { return _oplog; } -void LocalOplogInfo::setCollection(const Collection* oplog) { - _oplog = oplog; +void LocalOplogInfo::setCollection(const CollectionPtr& oplog) { + _oplog = oplog.detached(); } void LocalOplogInfo::resetCollection() { - _oplog = nullptr; + _oplog = CollectionPtr(); } void LocalOplogInfo::setNewTimestamp(ServiceContext* service, const Timestamp& newTime) { |