jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Pellegrino <laurent.pellegr...@gmail.com>
Subject Re: Transactional TDB
Date Tue, 01 Nov 2011 14:17:02 GMT
> Adding a non-caching StoreConnection.createMem() is also doable.
>
> So I understand the use case, why do you want separate in-memory databases?

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<andy@apache.org>  wrote:
>>>
>>> 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 tranaction
>>> (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 transaction
>>> but only one thread per transaction is tested; no guarantees multiple
>>> threads per transaction will everr be supported ; they just "should" work
>>> 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.  No nested trasnactions at all.  But if you are in a read transaction
>>> you can make as many reads as you want.
>>>
>>>> *  When a StoreConnection is created with Location.mem() as location,
>>>> 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?
>>>>   - http://openjena.org/wiki/TDB/Transactions
>>>
>>> Should be.
>>>
>>>
>>>>   - 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
>>>
>>>        Andy
>>>
>>>>
>>>> Kind Regards,
>>>> Laurent
>>>
>>>
>
>

Mime
View raw message