Return-Path: X-Original-To: apmail-incubator-jena-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-jena-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 8941A7D5A for ; Tue, 1 Nov 2011 14:17:28 +0000 (UTC) Received: (qmail 7047 invoked by uid 500); 1 Nov 2011 14:17:28 -0000 Delivered-To: apmail-incubator-jena-dev-archive@incubator.apache.org Received: (qmail 7024 invoked by uid 500); 1 Nov 2011 14:17:28 -0000 Mailing-List: contact jena-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jena-dev@incubator.apache.org Delivered-To: mailing list jena-dev@incubator.apache.org Received: (qmail 7015 invoked by uid 99); 1 Nov 2011 14:17:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 14:17:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of laurent.pellegrino@gmail.com designates 209.85.216.47 as permitted sender) Received: from [209.85.216.47] (HELO mail-qw0-f47.google.com) (209.85.216.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 14:17:23 +0000 Received: by qam2 with SMTP id 2so5671351qam.6 for ; Tue, 01 Nov 2011 07:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=y+L1VZRAOS7KPxA0ldHIXkqwbWmHLA1G1tW80qS7H3Q=; b=tTfFSFCZtRr0rylcmqCwR0QwZMcGvYoUlHz6z44K7QYOMvPv4oMdxKdplKKS+em7By 21vt+dVFDr/RJDgGE7MfLrHNJ5ziUpVLM6V1thEccyldV4p/CrX/yr5Id69Wmwxxo15/ topyMKTCXx4yZYioFsgeGdTuIvvTWoUsgzjcE= MIME-Version: 1.0 Received: by 10.68.1.1 with SMTP id 1mr594368pbi.55.1320157022045; Tue, 01 Nov 2011 07:17:02 -0700 (PDT) Received: by 10.68.52.65 with HTTP; Tue, 1 Nov 2011 07:17:02 -0700 (PDT) In-Reply-To: <4EAFD3B4.7010403@apache.org> References: <4EAD83D3.30802@apache.org> <4EAFD3B4.7010403@apache.org> Date: Tue, 1 Nov 2011 15:17:02 +0100 Message-ID: Subject: Re: Transactional TDB From: Laurent Pellegrino To: jena-dev@incubator.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Adding a non-caching StoreConnection.createMem() is also doable. > > So I understand the use case, why do you want separate in-memory database= s? When I am running some tests (instantiating several datastores), I prefer to use an in-memory datastore instead of a persistent datastore. It will improve the execution time (e.g. for tests which are I/O intensive) without affecting the result and without making any difference when the purpose of the test is not to measure the throughput of something. Moreover, if the test fail/crash, it avoids to remove manually the repositories associated to the tests which have crashed. Laurent >> On Sun, Oct 30, 2011 at 6:05 PM, Andy Seaborne =C2=A0wr= ote: >>> >>> On 29/10/11 15:06, Laurent Pellegrino wrote: >>>> >>>> Hi all, >>>> >>>> I have several questions about how to use the new transaction features >>>> provided with the last version of TDB: >>>> >>>> * Do we have to use the commit operation with a read transaction? Is >>>> it compulsory (e.g. to release a lock), optional, or an error? >>> >>> If you are using transaction at all, then you must use a read tranactio= n >>> (it >>> can end with commit, abort or close - it'll make no difference for read= ). >>> >>> Locking is not needed except that each transaction must be single >>> threaded >>> (basically, multiple-reader OR single-writer applies within a transacti= on >>> but only one thread per transaction is tested; no guarantees multiple >>> threads per transaction will everr be supported ; they just "should" wo= rk >>> at >>> the moment). >>> >>>> * It seems that operations on DatasetGraphTxn do not throw checked >>>> exceptions. However, do these operations can throw an unchecked >>>> exception? >>> >>> Yes. >>> >>> But any exception is a sign of internal problems (or breaching >>> concurrency). >>> >>> No normal operation should throw an exception. >>> >>>> * Does nested read transactions are allowed? >>> >>> No. =C2=A0No nested trasnactions at all. =C2=A0But if you are in a read= transaction >>> you can make as many reads as you want. >>> >>>> * =C2=A0When a StoreConnection is created with Location.mem() as locat= ion, >>>> what is created in memory (dataset+journal, only dataset or only >>>> journal)? >>> >>> Everything is (should) be in-memory. >>> >>> It's for testing only. >>> >>>> * Does the information on the following webpages are up to date? >>>> =C2=A0 - http://openjena.org/wiki/TDB/Transactions >>> >>> Should be. >>> >>> >>>> =C2=A0 - https://cwiki.apache.org/confluence/display/JENA/TxTDB-design >>> >>> May be not. >>> That was the design and no design survives first contact with >>> implementation >>> reality >>> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0Andy >>> >>>> >>>> Kind Regards, >>>> Laurent >>> >>> > >