k2v-academy / K2View-Academy

Other
0 stars 0 forks source link

NoTx actor for fabricSession #944

Closed VUtdLxcYoiEWuDsiwNQ68YvGIzoAJ17leFuyK2H closed 1 year ago

VUtdLxcYoiEWuDsiwNQ68YvGIzoAJ17leFuyK2H commented 1 year ago

Hi, I have a mapper actor with threadCount 2 that executes a broadway flow, Inside the broadway flow I run OpenFabricSession based on the tid, then I want to mark the new session as NoTx and use it later on in the flow. I get the following error: class java.lang.IllegalStateException Cause: Session already part of the active transaction: fabric_backet_573

thanks in advance:)

tZajFGR0CidT8AVERBHw8puD36HY6oWViykmIIb commented 1 year ago

In order to exclude fabric from the transaction, use the NoTx actor before running OpenFabricSession.

VUtdLxcYoiEWuDsiwNQ68YvGIzoAJ17leFuyK2H commented 1 year ago

Can I exclude only the new fabric session I opened (using the OpenFabricSession)? I use the default fabric connection in different parts of my logic and I need it as in transaction for DBLoad actors

tZajFGR0CidT8AVERBHw8puD36HY6oWViykmIIb commented 1 year ago

The NoTx actor only impacts the interface provided to it. So, you need to give a different name for this new fabric session - e.g. Session1, set it on the actor and also in the OpenFabricSession.