diff options
author | gregs <greg@10gen.com> | 2011-07-28 19:59:51 -0400 |
---|---|---|
committer | gregs <greg@10gen.com> | 2011-08-04 12:54:16 -0400 |
commit | 6bf06f445ea9e6e912ed16c6e8f4286ef0d85ef8 (patch) | |
tree | 67c5ef0b2243be2d54769a2b6d587f7fd49ea60a /s/d_split.cpp | |
parent | 3bef4ac063a65990215d6f641a79efb707d41bab (diff) | |
download | mongo-6bf06f445ea9e6e912ed16c6e8f4286ef0d85ef8.tar.gz |
don't allow multikey shard indices or array values in shard keys
Diffstat (limited to 's/d_split.cpp')
-rw-r--r-- | s/d_split.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/s/d_split.cpp b/s/d_split.cpp index c195f7b7668..6bf9c4e0a6a 100644 --- a/s/d_split.cpp +++ b/s/d_split.cpp @@ -177,6 +177,11 @@ namespace mongo { return false; } + if( d->isMultikey( d->idxNo( *idx ) ) ) { + errmsg = "index is multikey, cannot use for sharding"; + return false; + } + BtreeCursor * bc = BtreeCursor::make( d , d->idxNo(*idx) , *idx , min , max , false , 1 ); shared_ptr<Cursor> c( bc ); auto_ptr<ClientCursor> cc( new ClientCursor( QueryOption_NoCursorTimeout , c , ns ) ); |