jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Seaborne <andy.seabo...@epimorphics.com>
Subject Re: Concurrent updates in TDB
Date Sun, 06 Feb 2011 22:08:20 GMT

> Would the "journaled file access" approach you have suggested be a
> solution for avoiding long reads forbidding/delaying writes?

It's one of the things you can do. It's a form of transactions, yet, for 
read-access it retains the current performance model of TDB.

It allows reading and writing at the same time, up until the point the 
writes need to be committed.  At that point, optionally, write the 
changes to disk as a journal log, also needed if the amount of change is 
very large (see a related discussion on the dev list), then take lock to 
get exclusive access to the dataset.  Write changes (with the 
opportunity to do write ordering for improved performance), then release 
the exclusive lock.

In this scheme, a slow writer does not lock out readers, and readers do 
not lock out the application writing changes.  There is still an 
exclusive window but it is shorter and not dependent on unhelpfully slow 
write clients.

If the journal log is persistent, then recovery from crashes during the 
commit stage is a natural addition.  A non-persistent journal is only 
useful for speed, and given the journal can be written and read in an 
efficient style, I would not have thought it would be hugely useful.

(either we discussing this in JIRA or here - one or the other please, 
not both - I've copied this to JENA-41).

	Andy





Mime
View raw message