From cbe2d992e9cd1ea66af9fa91df006106775d3073 Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Tue, 23 Aug 2011 08:47:17 +0200 Subject: Imported Upstream version 1.8.3 --- s/chunk.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 's/chunk.cpp') 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& all ) { rwlock lk( _lock , false ); + getAllShards_inlock( all ); + } + + void ChunkManager::getAllShards_inlock( set& all ){ all.insert(_shards.begin(), _shards.end()); } -- cgit v1.2.3