Return-Path: X-Original-To: apmail-clerezza-dev-archive@www.apache.org Delivered-To: apmail-clerezza-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9501610F84 for ; Wed, 30 Oct 2013 13:42:37 +0000 (UTC) Received: (qmail 42554 invoked by uid 500); 30 Oct 2013 13:42:37 -0000 Delivered-To: apmail-clerezza-dev-archive@clerezza.apache.org Received: (qmail 42502 invoked by uid 500); 30 Oct 2013 13:42:37 -0000 Mailing-List: contact dev-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list dev@clerezza.apache.org Received: (qmail 42494 invoked by uid 99); 30 Oct 2013 13:42:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 13:42:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [213.238.45.90] (HELO r2-d2.netlabs.org) (213.238.45.90) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 13:42:28 +0000 Received: (qmail 17483 invoked by uid 89); 30 Oct 2013 13:42:06 -0000 Received: from unknown (HELO mail-lb0-f180.google.com) (farewellutopia@netlabs.org@209.85.217.180) by 0 with ESMTPA; 30 Oct 2013 13:42:06 -0000 Received: by mail-lb0-f180.google.com with SMTP id y6so1211631lbh.39 for ; Wed, 30 Oct 2013 06:42:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=zQm4qG3kgp7dzXAvzm5Nji6nDFSRrm8ViKbRuHWo0Zc=; b=Hz2bf5TheZdWylbcX3So/V3KIHu3u4qoGgCpb+0RJZHAjIrsfhWvvr4f1qnvowOiWm 20fa7k49ztepzjuoeZN/QWQnsBCPZRksrDKqKHCcP3Lr04emF18Yo2adhIVBKUgGUzZy /1axX8bK67+PHUYwOXxvWn1iTnmsxEdmAN14E2kOsaq8x3X8PqlHWGFhMaeaIG8srcHR Jo8WUr1tP0LjTTb3ZTNa6XDI8IWUb25z1BlXso7pdUWRNOpqAdycjQG7vjQY1dzszFUd Rek2kEhVLU5U4rcOxvJso4z5lLqlvAnZxyNFvO4GUMP0VavZs32R2Os+1NdZCutQGF9m 6p/g== X-Gm-Message-State: ALoCoQlvtPocB5D1T4Uhd5v6nkwy22Wl81phzrhT96qbSJs4DipO2J1ERXJ78gm7Aj/SH68ddLV+ MIME-Version: 1.0 X-Received: by 10.152.121.3 with SMTP id lg3mr3338370lab.0.1383140526132; Wed, 30 Oct 2013 06:42:06 -0700 (PDT) Received: by 10.152.121.41 with HTTP; Wed, 30 Oct 2013 06:42:06 -0700 (PDT) X-Originating-IP: [147.87.41.91] In-Reply-To: <5271077E.5090506@xup.nl> References: <5271077E.5090506@xup.nl> Date: Wed, 30 Oct 2013 14:42:06 +0100 Message-ID: Subject: Re: Problem with SingleTdbDatasetProvider From: =?ISO-8859-1?Q?Reto_Bachmann=2DGm=FCr?= To: dev@clerezza.apache.org Content-Type: multipart/alternative; boundary=089e0112d164bc267104e9f57ff6 X-Virus-Checked: Checked by ClamAV on apache.org --089e0112d164bc267104e9f57ff6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Minto Interesting problem you have there. > Thanks ;) > > Best is to fix the dreaded ConcurrentModificationException. Occasionally > I run into it it als well. But most probably it is not that trivial to > solve. > On hand we had some concurrency issues that caused the exception. I fixed (some of) them recently, the tests are now passing. On the other hand the exception is coming from Jena (as well as as from java collections) if the dataset (respectively the collection) is modified while iterating over it. Inthe case of addAll the modification of the underlying dataset is necessary, so this is not about some timing/concurrency. Cheers, Reto > > The only work around that I see is copy the MGraph to a different > provider and do the normal addAll(). This other provider does not > necessarily need to be in memory. Basically it is 2x addAll(). One to a > different provider and one back. > > My knowledge is too limited to comment on forwarding it to Jena. > > Hope this is of some help to you. > > Regards, > > Minto > > Reto Bachmann-Gm=FCr schreef op 30-10-2013 12:46: > > Hi > > > > I'm having a problem using addAll two add one Mgraph from > > SingeTdbDatasetProvider to another such MGraph. > > > > The problem is that the iterator over that added graph will return a > > ConcurrentModificationException as soon as a triple has been added to t= he > > target graph. > > > > I don't know how to solve this. Copying the graph to be added to memory > > doesn't seem to be a compealing solution. Maybe the add-all could be > > forwarded to Jena but this would solve the problem only in some cases, > not > > if there is any wrapper on the added graph or if union-graphs are used. > > > > Cheers, > > Reto > > > > > -- > ir. ing. Minto van der Sluis > Software innovator / renovator > Xup BV > > Mobiel: +31 (0) 626 014541 > > --089e0112d164bc267104e9f57ff6--