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 7DCC3FE1A for ; Tue, 19 Mar 2013 19:06:45 +0000 (UTC) Received: (qmail 93049 invoked by uid 500); 19 Mar 2013 19:06:45 -0000 Delivered-To: apmail-clerezza-dev-archive@clerezza.apache.org Received: (qmail 93007 invoked by uid 500); 19 Mar 2013 19:06:45 -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 92997 invoked by uid 99); 19 Mar 2013 19:06:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Mar 2013 19:06:45 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andy.seaborne.apache@gmail.com designates 209.85.212.178 as permitted sender) Received: from [209.85.212.178] (HELO mail-wi0-f178.google.com) (209.85.212.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Mar 2013 19:06:37 +0000 Received: by mail-wi0-f178.google.com with SMTP id hq4so919220wib.17 for ; Tue, 19 Mar 2013 12:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=EM3Bl3IKFmxVlKQ5QebAaW67AAibQEfcJzLsanbE5TA=; b=f0haM1vNqal9pBcr47sG5VfQ+Dho7Q/1yzKumedrb9JkcO1A2FVzJJWzrTVBBmmrlA MtoEOyeelGaG3Z47rxFCyDO4y3sK289+lKbpaRMDkPpunphogi7INNsEyanlAk0kmmVe JK7P5sls/s1/OhwdAOabu0gwOTjlZuIfmDKmOEtZy6QoPSI78oYB93loNYvUjOYL1LVL iDQAvo2RVstEycudU8FlrhZNHphPLvsqp/Tki15L6NlrMH03LYwTrrdDQ1q0Pfhierae o9607OqxnMtbHrXXnzTPnjPqWWKv434K65iYQXJ/5O2wCt0xKOu7a5kCimxNRdGxEPHb fR3w== X-Received: by 10.194.82.34 with SMTP id f2mr5726053wjy.25.1363719976965; Tue, 19 Mar 2013 12:06:16 -0700 (PDT) Received: from [192.168.0.10] (cpc37-aztw23-2-0-cust35.18-1.cable.virginmedia.com. [94.174.128.36]) by mx.google.com with ESMTPS id r7sm2744830wiz.2.2013.03.19.12.06.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Mar 2013 12:06:16 -0700 (PDT) Sender: Andy Seaborne Message-ID: <5148B726.2050802@apache.org> Date: Tue, 19 Mar 2013 19:06:14 +0000 From: Andy Seaborne User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: dev@clerezza.apache.org Subject: Re: Test failures on fresh build References: <5141A1FE.8060509@multimach.com> <51477F8E.6060905@xup.nl> <51483974.2020306@xup.nl> <51487D3F.4060105@apache.org> <514888AA.6020006@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 19/03/13 16:55, Reto Bachmann-Gm�r wrote: > On Tue, Mar 19, 2013 at 4:47 PM, Andy Seaborne wrote: > >> On 19/03/13 15:35, Reto Bachmann-Gm�r wrote: >> >>> On Tue, Mar 19, 2013 at 3:59 PM, Andy Seaborne wrote: >>> >>> On 19/03/13 13:57, Reto Bachmann-Gm�r wrote: >>>> >>>> So for the problem with the tdb tc provider I've made a first commit on >>>>> issue CLEREZZA-749. >>>>> >>>>> It doesn't solve the problem only shows it more clearly. >>>>> >>>>> Apparently jena tdb keeps the files open even after Graph.close has been >>>>> called making it impossible to delete them. I'm not sure how this could >>>>> be >>>>> solved or if we should raise an issue again Jena TDB. >>>>> >>>>> >>>> (you are using an old version of TDB - even without transactions, >>>> updating >>>> will pick up various important bug fixes) >>>> >>>> >>> Ok. >>> >>> >>>> A graph is just a stateless view on the database so closing a graph is a >>>> bit of a no-op (it syncs the files if not transactional). Just >>>> forgetting >>>> about them is fine, no close required. Or do a removeAll() to clear >>>> them. >>>> >>>> >>> The problem is that the underlying files are not closed and so they cannot >>> be deleted under windows. removeAll seems not to be available in the >>> version we are using. >>> >> >> Graph.remove(null, null, null) ; >> Model.removeAll() ; >> >> >> @Minto is the patch for CLEREZZA-726 ready to be applied or are you >>> working >>> on an update version? >>> >>> >>> >>>> TDB caches databases - it's expensive to keep opening and closing them >>>> (no >>>> disk caching benefits) and tracking whether its in use in Java isn't very >>>> helpful. You can flush the cache but that will not avoid the windows >>>> issue. >>>> >>>> >>> It could close the file when close on the graph is explicitely invoked? >>> >> >> One graph != one file. It's a groups of files for all graphs in the >> dataset. A named graph is a view of the quad table. >> >> >> Besides the window issue unix systems aren't happy either if they have to >>> keep unsued filehandler open. >>> >> >> If you flush the cache, the database is closed. >> >> >>> >>> >>>> Outside testing, don't delete a database while running. >>>> >>>> >>> So in tests there's apossibility I can remove the database files? >>> >> >> Yes - the TDB test suite does - on Windows it creates a new directory for >> each test using a unique name generator. They go away when the JVM exits >> but only then. >> > > Seems to be the only way. Tried flushing the dataset, the graph, deleting > all the triples yet the files remain in use. Deleting the graph is removing from the quad table. The database is separate from the view (graph). With transactions changes, especially many small transactions, get batched up so that changes can actually happen faster than non-transaction mode. Andy > > Changing the filemode in a static initializer seems to do the trick. Not > sure what the performance implications are. But for perfromance the > SingleTdbDatasetTcProvider should be used anyway. > > Cheers, > Reto