mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
use ShardKeyPattern
This commit is contained in:
parent
a49b857887
commit
2212fb8974
@ -101,8 +101,8 @@ namespace mongo {
|
||||
|
||||
if ( _sharded.size() > 0 ){
|
||||
BSONObjBuilder a;
|
||||
for ( map<string,BSONObj>::reverse_iterator i=_sharded.rbegin(); i != _sharded.rend(); i++){
|
||||
a.append( i->first.c_str() , i->second );
|
||||
for ( map<string,ShardKeyPattern>::reverse_iterator i=_sharded.rbegin(); i != _sharded.rend(); i++){
|
||||
a.append( i->first.c_str() , i->second.key() );
|
||||
}
|
||||
to.appendArray( "sharded" , a.obj() );
|
||||
}
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "../db/namespace.h"
|
||||
#include "../client/dbclient.h"
|
||||
#include "../client/model.h"
|
||||
#include "shardkey.h"
|
||||
|
||||
namespace mongo {
|
||||
|
||||
@ -93,7 +94,7 @@ namespace mongo {
|
||||
string _primary; // e.g. localhost , mongo.foo.com:9999
|
||||
bool _partitioned;
|
||||
|
||||
map<string,BSONObj> _sharded; // { "alleyinsider.blog.posts" : { ts : 1 } , ... ] - all ns that are sharded
|
||||
map<string,ShardKeyPattern> _sharded; // { "alleyinsider.blog.posts" : { ts : 1 } , ... ] - all ns that are sharded
|
||||
map<string,ShardInfo*> _shards; // this will only have entries for things that have been looked at
|
||||
|
||||
friend class Grid;
|
||||
|
Loading…
Reference in New Issue
Block a user