You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2016/09/17 17:25:20 UTC

[jira] [Comment Edited] (JENA-1237) TIM not isolating transactions at the start

    [ https://issues.apache.org/jira/browse/JENA-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15499141#comment-15499141 ] 

Andy Seaborne edited comment on JENA-1237 at 9/17/16 5:25 PM:
--------------------------------------------------------------

I discovered this while implementation transaction promotion for TIM. There will be a PR, and like current TDB it is off unless enabled while everything else gets aligned (so not for 3.1.1).  Code works, test work, needs to be turned into PR. Again, one that needs careful review before incorporating. It includes a generalized {{TestTransPromotion}} (which is for TDB) which is how I found this so it gets tested that way.

If you agree that this is the cause, something that needs careful review (just making things work is not good enough for concurrency!), I can fix this and put in a test case.



was (Author: andy.seaborne):
I discovered this while implementation transaction promotion for TIM. There will be a PR, and like current TDB it is off unless enabled while everything else gets aligned (so not for 3.1.1).  Code works, test work, needs to be turned into PR. Again, one that needs careful review before incorporating. It includes a generalized {{TestTramsPromotion}} (which is for TDB) which is how I found this so it gets tested that way.

If you agree that this is the cause, something that needs careful review (just making things work is not good enough for concurrency!), I can fix this and put in a test case.


> TIM not isolating transactions at the start
> -------------------------------------------
>
>                 Key: JENA-1237
>                 URL: https://issues.apache.org/jira/browse/JENA-1237
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.1.0
>            Reporter: Andy Seaborne
>            Assignee: A. Soroka
>         Attachments: ReportTxn.java
>
>
> TIM is not creating the transaction isolation when {{begin(READ)}} is called but on the first operation.
> The attached example has two other-thread actions that differ only in whether the begin is followed by a dataset read action (thread 2) or not (thread 1).  This changes the output of otherwise identical actions.
> {{ThreadAction}} takes 3 parts - the first part executes before the {{create}} returns, the second part when {{run}} is called and exceptions captured, the 3rd part is clearup (called during {{run}}).
> Annotated output from the attached program:
> {noformat}
> DatasetGraphInMemory
> thread 1:1 : x=<no count>
> Main       : other1
> thread 2:1 : x=0
> Main       : other2
> Main 1     : x=0
> Main 2     : x=1
> thread 1:2 : x=1          ** Should be zero **
> thread 2:2 : x=0
> TDBDataset
> thread 1:1 : x=<no count>
> Main       : other1
> thread 2:1 : x=0
> Main       : other2
> Main 1     : x=0
> Main 2     : x=1
> thread 1:2 : x=0          ** Correctly zero **
> thread 2:2 : x=0
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)