diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp index 0f85407..dc97414 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp @@ -1064,17 +1064,8 @@ namespace { WiredTigerItem keyItem( data.getBuffer(), data.getSize() ); c->set_key( c, keyItem.Get() ); - if ( !dupsAllowed ) { - // nice and clear - int ret = WT_OP_CHECK(c->remove(c)); - if (ret == WT_NOTFOUND) { - return; - } - invariantWTOK(ret); - return; - } - - // dups are allowed, so we have to deal with a vector of RecordIds. + // dups are 'always' allowed due to the way initial sync functions, so to avoid deleting + // the wrong record we check everything. This involves creating a vector of RecordId's int ret = WT_OP_CHECK(c->search(c)); if ( ret == WT_NOTFOUND )