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

Semen Boikov commented on IGNITE-5712:
--------------------------------------

Finished review, overall looks good, there are some minor comments:
* in GridNearTxLocal.suspend/resume you check tx state, but state can be 
concurrently changed right after this check. Instead you need check that 
tx.state(SUSPENDED)/tx.state(ACTIVE) return 'true', if it returns 'false' throw 
exception, also move transaction map updates after 
tx.state(SUSPENDED)/tx.state(ACTIVE).
* in TxManager.resumeTx you call 'txTop.set(tx.topologyVersionSnapshot());', 
why this is needed? I think tx.topologyVersionSnapshot() is always NONE there.
* 'catch (Throwable e)' in CacheJtaResource.end, it is bad practice to catch 
Throwable, why not Exception?
* to be on the safe side let's extend IgniteOptimisticTxSuspendResumeTest to 
run with more configurtions (You can use 
CacheOptimisticTransactionsWithFilterTest as example):
 ** with single node as it works now
 ** with multiple servers and clients, test operations are executed from both 
servers and clients
 ** test with near cache enabled
 ** test with changing topology: do some operations in tx, suspend tx, start 
new server node, resume tx and commit
 * is it possible to add in GridJtaTransactionManagerSelfTest case when tx is 
resumed from another thread?
*  'public void threadId(long threadId) throws IgniteCheckedException' method 
does not throw exception, please remove 'throws'
 * no need to add @Nullable for assertThrowsWithCause, it never returns null
* let's move IgniteOptimisticTxSuspendResumeTest and 
IgnitePessimisticTxSuspendResumeTest in IgniteCacheTestSuite6

Also please please merge latest changes from master.

Thanks!

> 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)

Reply via email to