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

Anton Vinogradov commented on IGNITE-1525:
------------------------------------------

Sounds good, 
but I have another idea in case of One-Phase-Commit, to send 
{{GridNearTxPreparePreliminaryResponse}} (new message) from Primary to Client 
after sending {{GridDhtTxPrepareRequest}} to Backup.
{{GridNearTxPreparePreliminaryResponse}} in this case should contain 
{{GridCacheReturn}}. This message delivers execution result, but not finishes 
Tx future.
In this case {{GridDhtTxPrepareResponse}} will deliver empty 
{{GridCacheReturn}}. 

So, steps:
1) Client sends {{GridNearTxPrepareRequest}} to Primary.
2) Primary sends {{GridDhtTxPrepareRequest}} to Backup.
3) Primary sends {{GridNearTxPreparePreliminaryResponse}} to Client. (new)
4) Backup sends {{GridDhtTxPrepareResponse}} to Primary.
5) Primary sends {{GridNearTxPrepareResponse}} to Client. (changed, 
{{GridNearTxPrepareResponse}} contains no {{GridCacheReturn}})

P.s. {{GridDhtTxFinishRequest}} and {{GridDhtTxFinishResponse}} still used to 
fix Primary failed case.

This case also required new message (Instead of [Backup receives an 
asynchronous ACK from originating node when TX is done]) but requires no 
additional memory at Backup.

Thoughts?


> Return value for cache operation can be lost with onePhaseCommit
> ----------------------------------------------------------------
>
>                 Key: IGNITE-1525
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1525
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: cache
>    Affects Versions: ignite-1.4
>            Reporter: Semen Boikov
>            Assignee: Anton Vinogradov
>            Priority: Blocker
>             Fix For: 1.7
>
>
> Looks like with {{onePhaseCommit}} return value for cache operation can be 
> lost if primary node fails, {{GridNearTxPrepareResponse}} with return value 
> is not received, but transaction executes 'check backup' step and finishes 
> without error.
> Reproduces in {{IgniteCachePutRetryTransactionalSelfTest.testInvoke}}, also 
> added one more test to check return value 
> {{IgniteCachePutRetryTransactionalSelfTest.testGetAndPut}}.
> Please unmute tests on TC when fixed.



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

Reply via email to