@leventov for the ArrayList part, I don't think it is a problem, because size++ happens after grow(). In another word, the size() is always smaller than or equal to elementData size. other methods should only use index which is smaller than size(), the growing part is beyond current size() and should not be visible to other method calls.
[ Full content available at: https://github.com/apache/incubator-druid/issues/6322 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org