Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6D829200BA6 for ; Tue, 18 Oct 2016 21:09:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6BFE9160ACE; Tue, 18 Oct 2016 19:09:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B7EE0160AFB for ; Tue, 18 Oct 2016 21:08:59 +0200 (CEST) Received: (qmail 426 invoked by uid 500); 18 Oct 2016 19:08:58 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 408 invoked by uid 99); 18 Oct 2016 19:08:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2016 19:08:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7086A2C4C77 for ; Tue, 18 Oct 2016 19:08:58 +0000 (UTC) Date: Tue, 18 Oct 2016 19:08:58 +0000 (UTC) From: "Sean Busbey (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-4469) ConcurrentModificationException while running MultiTable.xml node in Random Walk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 18 Oct 2016 19:09:00 -0000 [ https://issues.apache.org/jira/browse/ACCUMULO-4469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15586370#comment-15586370 ] Sean Busbey commented on ACCUMULO-4469: --------------------------------------- qq [~dimaspivak], would you like to be listed on our [page of contributors|http://accumulo.apache.org/people]? If so, do you want your employer listed? Timezone? > ConcurrentModificationException while running MultiTable.xml node in Random Walk > --------------------------------------------------------------------------------- > > Key: ACCUMULO-4469 > URL: https://issues.apache.org/jira/browse/ACCUMULO-4469 > Project: Accumulo > Issue Type: Bug > Components: test > Affects Versions: 1.7.2 > Reporter: Dima Spivak > Assignee: Dima Spivak > Fix For: 1.7.3, 1.8.1, 2.0.0 > > Attachments: ACCUMULO-4469_1.7_v1.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > After the resolution of ACCUMULO-4467, I got back to playing with Random Walk and had a failure caused by a {{ConcurrentModificationException}}: > {code} > 23 01:03:04,316 [randomwalk.Framework] ERROR: Error during random walk > java.lang.Exception: Error running node MultiTable.xml > at org.apache.accumulo.test.randomwalk.Module.visit(Module.java:346) > at org.apache.accumulo.test.randomwalk.Framework.run(Framework.java:59) > at org.apache.accumulo.test.randomwalk.Framework.main(Framework.java:119) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.accumulo.start.Main$2.run(Main.java:157) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.util.ConcurrentModificationException > at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) > at java.util.ArrayList$Itr.next(ArrayList.java:831) > at org.apache.accumulo.test.randomwalk.multitable.MultiTableFixture.tearDown(MultiTableFixture.java:64) > at org.apache.accumulo.test.randomwalk.Module.visit(Module.java:365) > at org.apache.accumulo.test.randomwalk.Module$1.call(Module.java:283) > at org.apache.accumulo.test.randomwalk.Module$1.call(Module.java:278) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:35) > ... 1 more > {code} > [This section of code|https://github.com/apache/accumulo/blob/master/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java#L61-L71] seems to be at fault. In particular, it looks like we're getting the table list, but then instead of doing a deep copy to a new {{ArrayList}} from which we choose tables to delete, we're looping through and deleting tables while referring to the changing list, which has the effect of modifying it and making Java unhappy. Am I missing something more complex or can I fix this one myself by just doing the aforementioned deep copy of the table list? Or is a better way to use the {{TableOperations.list()}} method and iterate through the {{SortedSet}} it provides? -- This message was sent by Atlassian JIRA (v6.3.4#6332)