[
https://issues.apache.org/jira/browse/IGNITE-5712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16101775#comment-16101775
]
Nikolay Izhikov commented on IGNITE-5712:
-----------------------------------------
> Let's just add assert in TxManager.suspend() that tx is not system (assert
> !tx.system()).
OK.
> let's add such assert in TxManager.resumeTx.
It can't be done with simple assert since system transaction stored in map
`ConcurrentMap<TxThreadKey, IgniteInternalTx>`
So check would be something like this.
Is it OK?
{code:java}
if (!sysThreadMap.isEmpty()) {
for (GridCacheContext cacheCtx :
cctx.cache().context().cacheContexts()) {
if (!cacheCtx.systemTx())
continue;
if (sysThreadMap.containsKey(new TxThreadKey(threadId,
cacheCtx.cacheId())))
throw new IgniteCheckedException("Thread already start
system transaction.");
}
}
{code}
> Context switching for optimistic transactions
> ---------------------------------------------
>
> Key: IGNITE-5712
> URL: https://issues.apache.org/jira/browse/IGNITE-5712
> Project: Ignite
> Issue Type: Sub-task
> Components: general
> Reporter: Alexey Kuznetsov
> Assignee: Nikolay Izhikov
>
> Implement context switching between threads for optimistic transactions
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)