From dev-return-25722-apmail-tinkerpop-dev-archive=tinkerpop.apache.org@tinkerpop.apache.org Wed Sep 5 18:21:04 2018 Return-Path: X-Original-To: apmail-tinkerpop-dev-archive@minotaur.apache.org Delivered-To: apmail-tinkerpop-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8723A1DED5 for ; Wed, 5 Sep 2018 18:21:04 +0000 (UTC) Received: (qmail 74615 invoked by uid 500); 5 Sep 2018 18:21:04 -0000 Delivered-To: apmail-tinkerpop-dev-archive@tinkerpop.apache.org Received: (qmail 74574 invoked by uid 500); 5 Sep 2018 18:21:04 -0000 Mailing-List: contact dev-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list dev@tinkerpop.apache.org Received: (qmail 74563 invoked by uid 99); 5 Sep 2018 18:21:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2018 18:21:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E66601A148B for ; Wed, 5 Sep 2018 18:21:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id tFd6H2rcRyyl for ; Wed, 5 Sep 2018 18:21:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 610405F4A1 for ; Wed, 5 Sep 2018 18:21:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 91F23E12FE for ; Wed, 5 Sep 2018 18:21:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 309EC26B58 for ; Wed, 5 Sep 2018 18:21:00 +0000 (UTC) Date: Wed, 5 Sep 2018 18:21:00 +0000 (UTC) From: "stephen mallette (JIRA)" To: dev@tinkerpop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (TINKERPOP-2029) ConcurrentModificationException for InlineFilterStrategy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TINKERPOP-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604692#comment-16604692 ] stephen mallette edited comment on TINKERPOP-2029 at 9/5/18 6:20 PM: --------------------------------------------------------------------- I've pushed a branch based on tp32 with associated tests that cause the failure: https://github.com/apache/tinkerpop/tree/TINKERPOP-2029 The process test to {{AndTest}} will need to be added as a GLV test still. There are technically two issues to consider. First, it seems that {{ConnectiveStrategy}} will transform certain {{and()}} and {{or()}} combinations to something that {{InlineFilterStrategy}} doesn't properly handle. Specifically, {{ConnectiveStrategyTest}} includes test cases that show that {code} __.has("name", "marko").and().has("name", "marko").and().has("name", "marko") {code} does not convert to: {code} __.and(has("name", "marko"), __.has("name", "marko"), __.has("name", "marko")) {code} and instead produces something like this: {code} java.lang.AssertionError: Expected :[AndStep([[HasStep([name.eq(marko)])], [HasStep([name.eq(marko)])], [HasStep([name.eq(marko)])]])] Actual :[HasStep([name.eq(marko)]), AndStep([[], [AndStep([[HasStep([name.eq(marko)])], []]), HasStep([name.eq(marko)])]])] {code} That in turn feeds to {{InlineFilterStrategy}} which seems to properly deal with the expected output above, but not the actual output that it's currently producing. I'm not completely sure what {{InlineFilterStrategy}} should do with such Gremlin if anything, but we should probably change the flow of it to avoid {{ConcurrentModificationException}} irrespective of the situation with {{InlineFilterStrategy}}. I've not been able to create a standalone scenario to recreate the {{ConcurrentModificationException}} so it might be best to deal with that first since it's currently failing that way. was (Author: spmallette): I've pushed a branch with associated tests that cause the failure: https://github.com/apache/tinkerpop/tree/TINKERPOP-2029 The process test to {{AndTest}} will need to be added as a GLV test still. There are technically two issues to consider. First, it seems that {{ConnectiveStrategy}} will transform certain {{and()}} and {{or()}} combinations to something that {{InlineFilterStrategy}} doesn't properly handle. Specifically, {{ConnectiveStrategyTest}} includes test cases that show that {code} __.has("name", "marko").and().has("name", "marko").and().has("name", "marko") {code} does not convert to: {code} __.and(has("name", "marko"), __.has("name", "marko"), __.has("name", "marko")) {code} and instead produces something like this: {code} java.lang.AssertionError: Expected :[AndStep([[HasStep([name.eq(marko)])], [HasStep([name.eq(marko)])], [HasStep([name.eq(marko)])]])] Actual :[HasStep([name.eq(marko)]), AndStep([[], [AndStep([[HasStep([name.eq(marko)])], []]), HasStep([name.eq(marko)])]])] {code} That in turn feeds to {{InlineFilterStrategy}} which seems to properly deal with the expected output above, but not the actual output that it's currently producing. I'm not completely sure what {{InlineFilterStrategy}} should do with such Gremlin if anything, but we should probably change the flow of it to avoid {{ConcurrentModificationException}} irrespective of the situation with {{InlineFilterStrategy}}. I've not been able to create a standalone scenario to recreate the {{ConcurrentModificationException}} so it might be best to deal with that first since it's currently failing that way. > ConcurrentModificationException for InlineFilterStrategy > -------------------------------------------------------- > > Key: TINKERPOP-2029 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2029 > Project: TinkerPop > Issue Type: Bug > Components: process > Affects Versions: 3.2.9 > Reporter: stephen mallette > Assignee: Daniel Kuppitz > Priority: Minor > > {code} > gremlin> g.V().has("name", "marko").and().has("name", "marko").and().has("name", "marko") > java.util.ConcurrentModificationException > Type ':help' or ':h' for help. > Display stack trace? [yN]y > java.util.ConcurrentModificationException > at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) > at java.util.ArrayList$Itr.next(ArrayList.java:859) > at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042) > at org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy.processHasStep(InlineFilterStrategy.java:114) > at org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy.apply(InlineFilterStrategy.java:93) > at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper.applySingleLevelStrategies(TraversalHelper.java:696) > at org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy.processAndStep(InlineFilterStrategy.java:248) > at org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy.apply(InlineFilterStrategy.java:96) > at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies.applyStrategies(DefaultTraversalStrategies.java:86) > at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.applyStrategies(DefaultTraversal.java:119) > at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:191) > at org.apache.tinkerpop.gremlin.console.Console$_closure3.doCall(Console.groovy:239) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) > at org.codehaus.groovy.tools.shell.Groovysh.setLastResult(Groovysh.groovy:460) > at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:196) > at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.super$3$execute(GremlinGroovysh.groovy) > at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225) > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145) > at org.apache.tinkerpop.gremlin.console.GremlinGroovysh.execute(GremlinGroovysh.groovy:72) > at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122) > at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95) > at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225) > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145) > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165) > at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:130) > at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59) > at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225) > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:145) > at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:165) > at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:89) > at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236) > at org.apache.tinkerpop.gremlin.console.Console.(Console.groovy:171) > at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:236) > at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:483) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)