> On Feb 3, 2016, at 5:13 AM, Jean-Marc Vanel <[email protected]> wrote:
> 
> In the documentation,
> 
> https://jena.apache.org/documentation/tdb/tdb_transactions.html#multi-threaded-use
> 
> it is not clear which use pattern is preferred and the reason why.

The first pattern shows a single dataset object being shared between threads, 
each of which operates a transaction against that object, and the second 
pattern is introduced with "or create a dataset object on the thread (the case 
above is preferred):”.

As to why, I am not familiar enough with TDB to be sure, but there is a comment 
on the second pattern "Each thread has a separate dataset object; these safely 
share the same storage but have independent transactions.” that would seem to 
indicate that the second pattern is vulnerable to having conflicts between 
transactions opened against the two different dataset objects.

---
A. Soroka
The University of Virginia Library


> On Feb 3, 2016, at 5:13 AM, Jean-Marc Vanel <[email protected]> wrote:
> 
> I have a repeating memory leak in TDB in my web application (
> https://github.com/jmvanel/semantic_forms/blob/master/scala/forms_play/README.md
> ).
> It is caching RDF documents from internet, typically dbpedia ressources.
> 
> It is not the use case described in "Fuseki/TDB memory leak for concurrent
> updates/queries" https://issues.apache.org/jira/browse/JENA-689 , as the
> journal is empty after crash .
> 
> A single Dataset object is used for the duration of the application, and I
> suspect this is the root cause.
> In the documentation,
> 
> https://jena.apache.org/documentation/tdb/tdb_transactions.html#multi-threaded-use
> 
> it is not clear which use pattern is preferred and the reason why.
> 
> You someone confirm that keeping a single Dataset object for the duration
> of the application is bad ?

Reply via email to