diff options
Diffstat (limited to 's/config.cpp')
-rw-r--r-- | s/config.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/s/config.cpp b/s/config.cpp index 8887c61a03b..0f5aaf1b2c1 100644 --- a/s/config.cpp +++ b/s/config.cpp @@ -215,14 +215,13 @@ namespace mongo { { scoped_lock lk( _lock ); - CollectionInfo& ci = _collections[ns]; - - bool earlyReload = ! ci.isSharded() && ( shouldReload || forceReload ); + bool earlyReload = ! _collections[ns].isSharded() && ( shouldReload || forceReload ); if ( earlyReload ) { // this is to catch cases where there this is a new sharded collection _reload(); - ci = _collections[ns]; } + + CollectionInfo& ci = _collections[ns]; massert( 10181 , (string)"not sharded:" + ns , ci.isSharded() ); assert( ! ci.key().isEmpty() ); |