Description
While running some load tests on a medium sized cluster I noticed a lot of blocked state on the index-manager threads. These threads are used during the parallel search. Upon inspection of a thread dump I noticed that all the blocked state threads were blocking on line 67 in the IndexInputCloser class. This is to synchronize on a collection addition because the implementation is a HashSet.
This task is to change the refs field to be a concurrenthashmap using the Collections.newSetFromMap() method.