try {
|
if ( !dupsAllowed && dropDups ) {
|
LastError::Disabled led( lastError.get() );
|
btBuilder.addKey(d.first, d.second);
|
}
|
else {
|
btBuilder.addKey(d.first, d.second);
|
}
|
}
|
catch( AssertionException& e ) {
|
if ( dupsAllowed ) {
|
// unknown exception??
|
throw;
|
}
|
|
if( e.interrupted() ) {
|
killCurrentOp.checkForInterrupt();
|
}
|
|
if ( ! dropDups )
|
throw;
|
|
/* we could queue these on disk, but normally there are very few dups, so instead we
|
keep in ram and have a limit.
|
*/
|
dupsToDrop.insert(d.second);
|
uassert( 10092 , "too may dups on index build with dropDups=true", dupsToDrop.size() < 1000000 );
|
}
|