[ 
https://issues.apache.org/jira/browse/IGNITE-19136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Pyatkov updated IGNITE-19136:
---------------------------------------
    Description: 
*Motivation*
There are several reasons by the replica can respond _ReplicaNotReadyException_ 
(storage recovery has not completed yet, indexes have not created). In this 
case, required sending AwaitReplicaRequest and don't try requesting any more 
until AwaitReplicaResponse doesn't be received.

But this case is not complied for read only requests. The result is unhandled 
exception:
{noformat}
Replica is not ready 
[replicationGroupId=474283c9-a39e-431a-895f-751003052d7a_part_10, 
nodeName=irott_n_1]
  at 
app//org.apache.ignite.internal.replicator.ReplicaManager.sendReplicaUnavailableErrorResponse(ReplicaManager.java:385)
  at 
app//org.apache.ignite.internal.replicator.ReplicaManager.onReplicaMessageReceived(ReplicaManager.java:167)
  at 
app//org.apache.ignite.network.DefaultMessagingService.onMessage(DefaultMessagingService.java:358)
  at 
app//org.apache.ignite.network.DefaultMessagingService.lambda$onMessage$3(DefaultMessagingService.java:314)
  at 
[email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at 
[email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at [email protected]/java.lang.Thread.run(Thread.java:834)
{noformat}

*Workaround*
Currently, when we use RW transaction before to use RO transaction, the issue 
won't be reproduced. Because RW transaction is waiting for the replica becomes 
ready.

*Definition of Done*
All types of request (RW, RO) should handle _ReplicaNotReadyException_ and wait 
for the replica will be ready to handle them.

  was:
*Motivation*

There are several reasons by the replica can respond _ReplicaNotReadyException_ 
(storage recovery has not completed yet, indexes have not created). In this 
case, required sending AwaitReplicaRequest and don't try requesting any more 
until AwaitReplicaResponse doesn't be received.

But this case is not complied for read only requests. The result is unhandled 
exception:

{noformat}
Replica is not ready 
[replicationGroupId=474283c9-a39e-431a-895f-751003052d7a_part_10, 
nodeName=irott_n_1]
  at 
app//org.apache.ignite.internal.replicator.ReplicaManager.sendReplicaUnavailableErrorResponse(ReplicaManager.java:385)
  at 
app//org.apache.ignite.internal.replicator.ReplicaManager.onReplicaMessageReceived(ReplicaManager.java:167)
  at 
app//org.apache.ignite.network.DefaultMessagingService.onMessage(DefaultMessagingService.java:358)
  at 
app//org.apache.ignite.network.DefaultMessagingService.lambda$onMessage$3(DefaultMessagingService.java:314)
  at 
[email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at 
[email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at [email protected]/java.lang.Thread.run(Thread.java:834)
{noformat}


> Readonly request handling on the replica which is not ready
> -----------------------------------------------------------
>
>                 Key: IGNITE-19136
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19136
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> *Motivation*
> There are several reasons by the replica can respond 
> _ReplicaNotReadyException_ (storage recovery has not completed yet, indexes 
> have not created). In this case, required sending AwaitReplicaRequest and 
> don't try requesting any more until AwaitReplicaResponse doesn't be received.
> But this case is not complied for read only requests. The result is unhandled 
> exception:
> {noformat}
> Replica is not ready 
> [replicationGroupId=474283c9-a39e-431a-895f-751003052d7a_part_10, 
> nodeName=irott_n_1]
>   at 
> app//org.apache.ignite.internal.replicator.ReplicaManager.sendReplicaUnavailableErrorResponse(ReplicaManager.java:385)
>   at 
> app//org.apache.ignite.internal.replicator.ReplicaManager.onReplicaMessageReceived(ReplicaManager.java:167)
>   at 
> app//org.apache.ignite.network.DefaultMessagingService.onMessage(DefaultMessagingService.java:358)
>   at 
> app//org.apache.ignite.network.DefaultMessagingService.lambda$onMessage$3(DefaultMessagingService.java:314)
>   at 
> [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>   at 
> [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>   at [email protected]/java.lang.Thread.run(Thread.java:834)
> {noformat}
> *Workaround*
> Currently, when we use RW transaction before to use RO transaction, the issue 
> won't be reproduced. Because RW transaction is waiting for the replica 
> becomes ready.
> *Definition of Done*
> All types of request (RW, RO) should handle _ReplicaNotReadyException_ and 
> wait for the replica will be ready to handle them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to