jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <>
Subject Re: current tdb shapshot has new problem
Date Thu, 03 Feb 2011 14:15:07 GMT

On 03/02/11 13:59, Benson Margulies wrote:
> This is very interesting. It's a synchronization bug of mine which
> never happens with 0.8.9 and is perfectly reproducible with the
> snapshot. I have a 'background sync' thread.
> So, the steps are something like:
> load a new graph into the database with some ontology.
> try to run  my query.
> in parallel, the sync thread calls TDB.sync, with no synchronization
> between the thread running the query and the sync.
> *blam*
> I assume that this is entirely my problem unless you tell me
> otherwise, in which case I'll attach the small test case I just
> concocted.

Yes - it's the application's problem.

The system can't do the locking sensibly.  It could do MRSW around every 
operation but all it's protecting is the database RDF consistency, not 
the application.  An app might add a triple, look in the DB, add a 
second triple, and want that under a single lock.  The system can't know.

Transactions give you that.  And sometime ... sometime ...


View raw message