From 0785b7a0a33c56a5915121ec87949304dd55052c Mon Sep 17 00:00:00 2001 From: Alberto Lerner Date: Fri, 26 Oct 2012 17:49:50 -0400 Subject: SERVER-939 Introduced more collection and fields names constants. --- src/mongo/s/grid.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mongo/s/grid.cpp') 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 ){ -- cgit v1.2.1