To add some code, I'm seeing a couple of places in the driver that fails 
trying to begin an already in transaction session.

if ( state == State.MARKED_SUCCESS )
{
    conn.run( "COMMIT", Collections.<String, Value>emptyMap(), 
StreamCollector.NO_OP );
    conn.discardAll();
    conn.sync();
    state = State.SUCCEEDED;
}

 
In the code above, on conn.sync() is failing and I see that in the neo4j 
thread is trying to begin the session which is in IN_TRANSACTION state.
Same thing happens in the code below which is part of 
InternalStatementResult.java, when it executes connection.receiveOne():

private boolean tryFetchNext()
{
    while ( recordBuffer.isEmpty() )
    {
        if ( done )
        {
            return false;
        }
        connection.receiveOne();
    }

    return true;
}


Hope this helps,
Matias.

El viernes, 26 de agosto de 2016, 17:57:16 (UTC-3), Matias Burak escribió:
>
> Hi Nigel, I'm not sure but what I've seen is that there is a neo4j.Session 
> thread that it's trying to do a 'begin' on a session worker that is already 
> IN_TRANSACTION. 
> How can I know who is doing that operation that is triggering that thread 
> and why it's trying to begin an already started session worker?
>
> El jueves, 4 de agosto de 2016, 18:49:42 (UTC-3), Nigel Small escribió:
>>
>> Hi Matias
>>
>> It's hard to tell without seeing some code. What concurrency are you 
>> referring to?
>>
>> I do think we need to fix that error though - it's very unhelpful to a 
>> typical application developer. Coincidentally, we're currently working on 
>> this part of the code so I'll make sure we improve the error message!
>>
>> Nigel
>>
>> On 3 August 2016 at 20:03, Matias Burak <mbu...@gmail.com> wrote:
>>
>>> Hi, anyone knows why I am getting this error?
>>>
>>>
>>> 'beginning implicit transaction' cannot be done when a session is in the 
>>> 'IN_TRANSACTION' state.
>>>
>>>
>>> This is using java-driver v1.0.4 and bolt 3.0.4
>>>
>>>
>>> It looks that this is happening when the driver is doing a hasNext.
>>>
>>> Is that starting an implicit transaction? 
>>>
>>> I think it might have to do with concurrent bolt calls to do certain 
>>> operations? It's weird....
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to neo4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to