reader = replaceActiveReader( outOfDateReader, directoryProviderLock, directoryProvider, readers );
}
else {
if ( trace )
log.trace( "Valid shared IndexReader: " + directoryProvider.getDirectory().toString() );
directoryProviderLock.lock();
try {
//read the latest active one, the current one could be out of date and closed already
//the latest active is guaranteed to be active because it's protected by the dp lock
reader = activeSearchIndexReaders.get( directoryProvider );
semaphoreIndexReaderLock.lock();