diff options
author | David Storch <david.storch@10gen.com> | 2015-06-22 12:25:10 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-06-23 14:16:18 -0400 |
commit | b8f0f273d8f2db1aed1974b94c9b18a63656ad48 (patch) | |
tree | ef86771a005eed7dc7d409857f187aba764a0a02 /src/mongo/db/namespace_string.cpp | |
parent | edfeb6a9f7a5f30a951c673374e9e058b1886a10 (diff) | |
download | mongo-b8f0f273d8f2db1aed1974b94c9b18a63656ad48.tar.gz |
SERVER-5811 implement the killCursors command for mongod
Implementing the killCursors command in mongos and the mongo shell is further work.
Diffstat (limited to 'src/mongo/db/namespace_string.cpp')
-rw-r--r-- | src/mongo/db/namespace_string.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/namespace_string.cpp b/src/mongo/db/namespace_string.cpp index f8c0b6751bb..afe30a3a977 100644 --- a/src/mongo/db/namespace_string.cpp +++ b/src/mongo/db/namespace_string.cpp @@ -83,22 +83,22 @@ bool legalClientSystemNS(StringData ns, bool write) { return false; } -bool NamespaceString::isListCollectionsGetMore() const { +bool NamespaceString::isListCollectionsCursorNS() const { return coll() == StringData("$cmd.listCollections", StringData::LiteralTag()); } namespace { -const StringData listIndexesGetMoreNSPrefix("$cmd.listIndexes.", StringData::LiteralTag()); +const StringData listIndexesCursorNSPrefix("$cmd.listIndexes.", StringData::LiteralTag()); } // namespace -bool NamespaceString::isListIndexesGetMore() const { - return coll().size() > listIndexesGetMoreNSPrefix.size() && - coll().startsWith(listIndexesGetMoreNSPrefix); +bool NamespaceString::isListIndexesCursorNS() const { + return coll().size() > listIndexesCursorNSPrefix.size() && + coll().startsWith(listIndexesCursorNSPrefix); } -NamespaceString NamespaceString::getTargetNSForListIndexesGetMore() const { - dassert(isListIndexesGetMore()); - return NamespaceString(db(), coll().substr(listIndexesGetMoreNSPrefix.size())); +NamespaceString NamespaceString::getTargetNSForListIndexes() const { + dassert(isListIndexesCursorNS()); + return NamespaceString(db(), coll().substr(listIndexesCursorNSPrefix.size())); } string NamespaceString::escapeDbName(const StringData dbname) { |