final synchronized void mergeFinish(MergePolicy.OneMerge merge){
  notifyAll();
  if (merge.registerDone) {
    final List<SegmentCommitInfo> sourceSegments=merge.segments;
    for (    SegmentCommitInfo info : sourceSegments) {
      mergingSegments.remove(info);
    }
    merge.registerDone=false;
  }
  runningMerges.remove(merge);
}

final synchronized void mergeFinish ( MergePolicy . OneMerge merge ) { notifyAll ( ) ; if ( merge . registerDone ) { final List < SegmentCommitInfo > sourceSegments = merge . segments ; for ( SegmentCommitInfo info : sourceSegments ) { mergingSegments . remove ( info ) ; } merge . registerDone = false ; } runningMerges . remove ( merge ) ; }
does fininishing for a merge , which is fast but holds the synchronized lock on indexwriter instance .
