OpenSearch/core
Jay Modi 64d11b8831 Fix race condition in RemoteClusterConnection node supplier (#25432)
This commit fixes a race condition in the node supplier used by the RemoteClusterConnection. The
node supplier stores an iterator over a set backed by a ConcurrentHashMap, but the get operation
of the supplier uses multiple methods of the iterator and is suceptible to a race between the
calls to hasNext() and next(). The test in this commit fails under the old implementation with a
NoSuchElementException. This commit adds a wrapper object over a set and a iterator, with all methods
being synchronized to avoid races. Modifications to the set result in the iterator being set to null
and the next retrieval creates a new iterator.
2017-06-28 15:50:24 -06:00
..
licenses Upgrade to lucene-7.0.0-snapshot-ad2cb77. (#25349) 2017-06-22 12:35:33 +02:00
src Fix race condition in RemoteClusterConnection node supplier (#25432) 2017-06-28 15:50:24 -06:00
build.gradle Mark Log4j API dependency as non-optional 2017-06-08 16:09:34 -04:00