mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
ConcurrentHashMap does not always behave correctly if removing elements and concurrently checking for its emptyiness. Work around this by protecting all usages with a mutex (there was only one usage unprotected by the mutex anyway) and then we don't even need a ConcurrentHashMap at all.