summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/process_interface_standalone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/process_interface_standalone.cpp')
-rw-r--r--src/mongo/db/pipeline/process_interface_standalone.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/process_interface_standalone.cpp b/src/mongo/db/pipeline/process_interface_standalone.cpp
index a071a848a5a..86dfbd0f09a 100644
--- a/src/mongo/db/pipeline/process_interface_standalone.cpp
+++ b/src/mongo/db/pipeline/process_interface_standalone.cpp
@@ -247,7 +247,7 @@ void MongoInterfaceStandalone::renameIfOptionsAndIndexesHaveNotChanged(
const NamespaceString& targetNs,
const BSONObj& originalCollectionOptions,
const std::list<BSONObj>& originalIndexes) {
- Lock::GlobalWrite globalLock(opCtx);
+ Lock::DBLock(opCtx, targetNs.db(), MODE_X);
uassert(ErrorCodes::CommandFailed,
str::stream() << "collection options of target collection " << targetNs.ns()
@@ -341,11 +341,18 @@ std::string MongoInterfaceStandalone::getShardName(OperationContext* opCtx) cons
return std::string();
}
-std::pair<std::vector<FieldPath>, bool> MongoInterfaceStandalone::collectDocumentKeyFields(
- OperationContext* opCtx, NamespaceStringOrUUID nssOrUUID) const {
+std::pair<std::vector<FieldPath>, bool>
+MongoInterfaceStandalone::collectDocumentKeyFieldsForHostedCollection(OperationContext* opCtx,
+ const NamespaceString& nss,
+ UUID uuid) const {
return {{"_id"}, false}; // Nothing is sharded.
}
+std::vector<FieldPath> MongoInterfaceStandalone::collectDocumentKeyFieldsActingAsRouter(
+ OperationContext* opCtx, const NamespaceString& nss) const {
+ return {"_id"}; // Nothing is sharded.
+}
+
std::vector<GenericCursor> MongoInterfaceStandalone::getIdleCursors(
const intrusive_ptr<ExpressionContext>& expCtx, CurrentOpUserMode userMode) const {
return CursorManager::getIdleCursors(expCtx->opCtx, userMode);