diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-08-02 23:23:53 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-08-02 23:23:53 -0400 |
commit | fd600969e0eccdfce48bb93fadaecc5daed64129 (patch) | |
tree | e0638f93e26e5b96da76dbb923beac446465c6f3 | |
parent | 5a52bca5dd9952119aad7e8ba3395535f7deec30 (diff) | |
download | mongo-fd600969e0eccdfce48bb93fadaecc5daed64129.tar.gz |
can't use SYNC cluster a shard SERVER-1535
-rw-r--r-- | s/grid.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/s/grid.cpp b/s/grid.cpp index ea05f1bcc99..6843059c8c9 100644 --- a/s/grid.cpp +++ b/s/grid.cpp @@ -132,6 +132,12 @@ namespace mongo { try { ScopedDbConnection newShardConn( host ); newShardConn->getLastError(); + + if ( newShardConn->type() == ConnectionString::SYNC ){ + newShardConn.done(); + *errMsg = "can't use sync cluster as a shard. for replica set, have to use <name>/<server1>,<server2>,..."; + return false; + } // get the shard's local db's listing BSONObj res; |