summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorgregs <greg@10gen.com>2012-06-09 15:08:46 -0400
committergregs <greg@10gen.com>2012-06-09 15:08:46 -0400
commit5ebe3b63d49130e410253a2d33e2ec209c741042 (patch)
tree3df4250df27d9deabdaeb6afe660274f90df1d04 /src/mongo/s
parentf1852efa8e4e5d702c472c35fb45d0a29a90d7d3 (diff)
downloadmongo-5ebe3b63d49130e410253a2d33e2ec209c741042.tar.gz
Revert "cleanup from merge with patch for legacy no-namespace SCE"
This reverts commit 53f2e42ee37d870ef8f23976de52bf4e37480094.
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/strategy_shard.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mongo/s/strategy_shard.cpp b/src/mongo/s/strategy_shard.cpp
index 30157566277..9f6d0e640a9 100644
--- a/src/mongo/s/strategy_shard.cpp
+++ b/src/mongo/s/strategy_shard.cpp
@@ -213,13 +213,20 @@ namespace mongo {
int retries,
const string& ns,
const BSONObj& query,
- StaleConfigException& e,
+ const StaleConfigException& e,
Request& r ) // TODO: remove
{
static const int MAX_RETRIES = 5;
if( retries >= MAX_RETRIES ) throw e;
+ // Assume the inserts did *not* succeed, so we don't want to erase them
+
+ int logLevel = retries < 2;
+ LOG( logLevel ) << "retrying bulk insert of "
+ << query << " documents "
+ << " because of StaleConfigException: " << e << endl;
+
//
// On a stale config exception, we have to assume that the entire collection could have
// become unsharded, or sharded with a different shard key - we need to re-run all the
@@ -739,7 +746,7 @@ namespace mongo {
catch ( StaleConfigException& e ) {
dbcon.done();
- _handleRetries( "update", retries, ns, query, e, r );
+ _handleRetries( "update", retries, query, e, r );
_update( ns, query, toUpdate, flags, r, d, retries + 1 );
return;
}
@@ -865,7 +872,7 @@ namespace mongo {
}
catch ( StaleConfigException& e ) {
dbcon.done();
- _handleRetries( "delete", retries, ns, query, e, r );
+ _handleRetries( "delete", retries, query, e, r );
_delete( ns, query, flags, r, d, retries + 1 );
return;
}