don't delete old chunk data until there aren't cursors iterating it SERVER-937

This commit is contained in:
Eliot Horowitz
2010-07-22 17:24:51 -04:00
parent aeb3276abc
commit 4308df6f3b
5 changed files with 64 additions and 14 deletions

View File

@@ -357,6 +357,16 @@ namespace mongo {
client.shutdown();
}
void ClientCursor::find( const string& ns , set<CursorId>& all ){
recursive_scoped_lock lock(ccmutex);
for ( CCById::iterator i=clientCursorsById.begin(); i!=clientCursorsById.end(); ++i ){
if ( i->second->ns == ns )
all.insert( i->first );
}
}
ClientCursorMonitor clientCursorMonitor;
} // namespace mongo