summaryrefslogtreecommitdiff
path: root/s/d_migrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 's/d_migrate.cpp')
-rw-r--r--s/d_migrate.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/s/d_migrate.cpp b/s/d_migrate.cpp
index e24a02d..731761f 100644
--- a/s/d_migrate.cpp
+++ b/s/d_migrate.cpp
@@ -1445,13 +1445,13 @@ namespace mongo {
bool didAnything = false;
if ( xfer["deleted"].isABSONObj() ) {
- writelock lk(ns);
- Client::Context cx(ns);
-
RemoveSaver rs( "moveChunk" , ns , "removedDuring" );
BSONObjIterator i( xfer["deleted"].Obj() );
while ( i.more() ) {
+ writelock lk(ns);
+ Client::Context cx(ns);
+
BSONObj id = i.next().Obj();
// do not apply deletes if they do not belong to the chunk being migrated
@@ -1472,11 +1472,11 @@ namespace mongo {
}
if ( xfer["reload"].isABSONObj() ) {
- writelock lk(ns);
- Client::Context cx(ns);
-
BSONObjIterator i( xfer["reload"].Obj() );
while ( i.more() ) {
+ writelock lk(ns);
+ Client::Context cx(ns);
+
BSONObj it = i.next().Obj();
Helpers::upsert( ns , it );