Github user robertdale commented on the issue: https://github.com/apache/tinkerpop/pull/745 The race condition is in `put()` and it's used elsewhere. It would make more sense to fix `put()` to be thread-safe. Then we can keep `parallelStream()` ``` Map<Object, Set<T>> keyMap = this.index.get(key); if (keyMap == null) { keyMap = this.index.putIfAbsent(key, new ConcurrentHashMap<>()); } Set<T> objects = keyMap.get(value); if (null == objects) { objects = keyMap.putIfAbsent(value, ConcurrentHashMap.newKeySet()); } objects.add(element); ```
---