On 16/11/15 14:36, Chris Dollin wrote:
Dear All

Hi Chris,


Some time recently org.apache.jena.sparql.core.DatasetChanges

git log jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetChanges.java

grew a listen() method with the comment "Release any resources".

s/listen\(\)/reset\(\)/


What sort of any are the released resources? Presumably finish()
does resource cleanup, so what is reset doing that finish doesn't
do? My best guess is that it is for abandoning state that is
handling an incomplete series of triples without abandoning
the entire state of the DatasetChanges implementation.

I can't find any use of reset().

But a sequence of changes might be several start-finish to group things but part of a larger process that is across the same internal resources in which case a final "reset()" indicates that's all over e.g. a commit. it decouples the app needs for grouping (e.g. a small set of related changes) to a larger grouping like a transaction.

start-finish-start-finish...-start-finish-reset

Advance notice:

It looks like DatasetChanges or an interface extending DatasetChanges or a better-parallel interface needs to reflect transaction boundaries properly.

This has now come up a couple of times in different places so it is indicative that DatasetChanges isn't the right design.

[I'm asking because ppd-index implements TextDocProducerBatch

not part of Jena

which implements DatasetChanges and I want to know what the
expectation of callers of TextDocProducerBatch.reset)() may have.]

Any experience to report especially regarding transactions and DatasetChanges changes or replacement?


Chris


        Andy


Reply via email to