diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-08-23 08:47:17 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-08-23 08:47:17 +0200 |
commit | cbe2d992e9cd1ea66af9fa91df006106775d3073 (patch) | |
tree | fca8e11a8ab7f063ae26802016068f9c814f6176 /s/chunk.cpp | |
parent | 64b33ee522375a8dc15be2875dfb7db4502259b0 (diff) | |
download | mongodb-cbe2d992e9cd1ea66af9fa91df006106775d3073.tar.gz |
Imported Upstream version 1.8.3
Diffstat (limited to 's/chunk.cpp')
-rw-r--r-- | s/chunk.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/s/chunk.cpp b/s/chunk.cpp index 1e473e2..2d0ad5d 100644 --- a/s/chunk.cpp +++ b/s/chunk.cpp @@ -749,7 +749,7 @@ namespace mongo { FieldRange range = frs->range(_key.key().firstElement().fieldName()); if ( !range.nontrivial() ) { DEV PRINT(range.nontrivial()); - getAllShards(shards); + getAllShards_inlock(shards); return; } } @@ -806,6 +806,10 @@ namespace mongo { void ChunkManager::getAllShards( set<Shard>& all ) { rwlock lk( _lock , false ); + getAllShards_inlock( all ); + } + + void ChunkManager::getAllShards_inlock( set<Shard>& all ){ all.insert(_shards.begin(), _shards.end()); } |