summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.cpp
diff options
context:
space:
mode:
authorAlberto Lerner <alerner@10gen.com>2012-10-26 17:49:50 -0400
committerAlberto Lerner <alerner@10gen.com>2012-11-05 19:10:16 -0500
commit0785b7a0a33c56a5915121ec87949304dd55052c (patch)
tree830b0ca5dc329a12f506d63e0554735a2032b682 /src/mongo/s/grid.cpp
parent389613bb9727d1594f10ce1abe50a048fa062460 (diff)
downloadmongo-0785b7a0a33c56a5915121ec87949304dd55052c.tar.gz
SERVER-939 Introduced more collection and fields names constants.
Diffstat (limited to 'src/mongo/s/grid.cpp')
-rw-r--r--src/mongo/s/grid.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index ffc951bc897..1f25f45fc28 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -85,13 +85,13 @@ namespace mongo {
BSONObjBuilder b;
b.appendRegex( "_id" , (string)"^" +
pcrecpp::RE::QuoteMeta( database ) + "$" , "i" );
- BSONObj d = conn->get()->findOne( ShardNS::database , b.obj() );
+ BSONObj dbObj = conn->get()->findOne( ConfigNS::database , b.obj() );
conn->done();
- if ( ! d.isEmpty() ) {
+ if ( ! dbObj.isEmpty() ) {
uasserted( DatabaseDifferCaseCode, str::stream()
<< "can't have 2 databases that just differ on case "
- << " have: " << d["_id"].String()
+ << " have: " << dbObj[DatabaseFields::name()].String()
<< " want to add: " << database );
}
}
@@ -452,8 +452,8 @@ namespace mongo {
try {
// look for the stop balancer marker
balancerDoc = conn->get()->findOne( ShardNS::settings, BSON( "_id" << "balancer" ) );
- if( ns.size() > 0 ) collDoc = conn->get()->findOne( ShardNS::collection,
- BSON( "_id" << ns ) );
+ if( ns.size() > 0 ) collDoc = conn->get()->findOne(ConfigNS::collection,
+ BSON( CollectionFields::name(ns)));
conn->done();
}
catch( DBException& e ){