summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/storage_interface.h
diff options
context:
space:
mode:
authorDavid Hatch <david.hatch@mongodb.com>2016-07-08 17:16:15 -0400
committerDavid Hatch <david.hatch@mongodb.com>2016-07-28 22:33:08 -0400
commit13448cde4947adb5c935bb034187480365cf692f (patch)
tree2cf01918467d33755976588fac7dedb530530c7a /src/mongo/db/repl/storage_interface.h
parent3a9e531cd088b6c10bec4b1d9d6ea49b3db8ce7a (diff)
downloadmongo-13448cde4947adb5c935bb034187480365cf692f.tar.gz
SERVER-24239 Allow creation of indexes with the same key pattern.
Diffstat (limited to 'src/mongo/db/repl/storage_interface.h')
-rw-r--r--src/mongo/db/repl/storage_interface.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/repl/storage_interface.h b/src/mongo/db/repl/storage_interface.h
index cf06e9caae0..25873b366ea 100644
--- a/src/mongo/db/repl/storage_interface.h
+++ b/src/mongo/db/repl/storage_interface.h
@@ -29,10 +29,12 @@
#pragma once
+#include <boost/optional.hpp>
#include <iosfwd>
#include <string>
#include "mongo/base/disallow_copying.h"
+#include "mongo/base/string_data.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/collection_bulk_loader.h"
#include "mongo/db/repl/optime.h"
@@ -219,7 +221,7 @@ public:
/**
* Finds the first document returned by a collection or index scan on the collection in the
* requested direction.
- * If "indexKeyPattern" is empty, a collection scan is used to locate the document.
+ * If "indexName" is boost::none, a collection scan is used to locate the document.
*/
enum class ScanDirection {
kForward = 1,
@@ -227,17 +229,17 @@ public:
};
virtual StatusWith<BSONObj> findOne(OperationContext* txn,
const NamespaceString& nss,
- const BSONObj& indexKeyPattern,
+ boost::optional<StringData> indexName,
ScanDirection scanDirection) = 0;
/**
* Deletes the first document returned by a collection or index scan on the collection in the
* requested direction. Returns deleted document on success.
- * If "indexKeyPattern" is empty, a collection scan is used to locate the document.
+ * If "indexName" is null, a collection scan is used to locate the document.
*/
virtual StatusWith<BSONObj> deleteOne(OperationContext* txn,
const NamespaceString& nss,
- const BSONObj& indexKeyPattern,
+ boost::optional<StringData> indexName,
ScanDirection scanDirection) = 0;
};