diff options
author | Greg Studer <greg@10gen.com> | 2012-10-18 10:52:15 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2012-10-18 10:54:14 -0400 |
commit | 2d0c3f0cae0d6d0a9f32e0a8ac19e389bf8d0f54 (patch) | |
tree | 3865644f81e957363a646010491f100dada70947 | |
parent | 6f7c02d28f7ab7d88ca02c6279e2f5dabd05c034 (diff) | |
download | mongo-2d0c3f0cae0d6d0a9f32e0a8ac19e389bf8d0f54.tar.gz |
SERVER-7376 make migration not wait for deletes, no change to default delete behavior
-rw-r--r-- | src/mongo/s/d_migrate.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mongo/s/d_migrate.cpp b/src/mongo/s/d_migrate.cpp index f5d59566b71..69070aab02c 100644 --- a/src/mongo/s/d_migrate.cpp +++ b/src/mongo/s/d_migrate.cpp @@ -265,7 +265,13 @@ namespace mongo { const BSONObj& min , const BSONObj& max , const BSONObj& shardKeyPattern ) { - scoped_lock ll(_workLock); + + // + // Do not hold _workLock + // + + //scoped_lock ll(_workLock); + scoped_lock l(_m); // reads and writes _active verify( ! _active ); @@ -334,7 +340,7 @@ namespace mongo { case 'd': { - if ( getThreadName() == cleanUpThreadName ) { + if (getThreadName().find(cleanUpThreadName) == 0) { // we don't want to xfer things we're cleaning // as then they'll be deleted on TO // which is bad @@ -667,7 +673,10 @@ namespace mongo { }; void _cleanupOldData( OldDataCleanup cleanup ) { - Client::initThread( cleanUpThreadName ); + + Client::initThread((string(cleanUpThreadName) + string("-") + + OID::gen().toString()).c_str()); + if (!noauth) { cc().getAuthenticationInfo()->authorize("local", internalSecurity.user); } |