You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Andrei Sereda (JIRA)" <ji...@apache.org> on 2018/09/04 13:12:00 UTC
[jira] [Commented] (CALCITE-2525) ConcurrentModificationException
may be triggered in ElasticsearchProject
[ https://issues.apache.org/jira/browse/CALCITE-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16603022#comment-16603022 ]
Andrei Sereda commented on CALCITE-2525:
----------------------------------------
[~Functor10] can you please supply a unit test for this (or at least a query) ?
> ConcurrentModificationException may be triggered in ElasticsearchProject
> ------------------------------------------------------------------------
>
> Key: CALCITE-2525
> URL: https://issues.apache.org/jira/browse/CALCITE-2525
> Project: Calcite
> Issue Type: Bug
> Components: elasticsearch-adapter
> Affects Versions: next
> Reporter: Siyuan Liu
> Assignee: Julian Hyde
> Priority: Major
> Fix For: next
>
>
> {code:java}
> //in ElasticsearchProject
> for (String opfield : implementor.list) {
> if (opfield.startsWith("\"_source\"")) {
> implementor.list.remove(opfield);
> }
> }
> {code}
> The ConcurrentModificationException will be trigged when `opField` which are iterating on is removed. This code should be replaced with list.removeIf(Predicate)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)