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

 Kirill Sizov updated IGNITE-20365:
-----------------------------------
    Description: 
Some tests, e.g. testTxStateReplicaRequestMissLeaderMiss expects primary 
replica to be changed. Earlier when primary replica was collocated with leader 
refreshAndGetLeaderWithTerm was used in order to change leader and thus primary 
replica. Now when Placement driver assigns primary replica it's no longer the 
case. All in all, some PlacementDriver#changePrimaryReplica or similar will be 
useful, at least within tests.
 

*Implementation Details*
+Important note:+ The lease contract prohibits intersecting leases. We don't 
want to break this contract, so we will have to wait until the current lease 
ends before another replica becomes primary.

There are two ways to implement this functionality - either extend 
{{PlacementDriver}} in the product or change only the test code. Looks like the 
second approach is not enough if we start a test ignite instance using an 
{{IgniteImpl}} class. So we might need to consider extend the production code. 
Moreover, such change might become the first step towards a graceful cluster 
reconfiguration.



  was:
Some tests, e.g. testTxStateReplicaRequestMissLeaderMiss expects primary 
replica to be changed. Earlier when primary replica was collocated with leader 
refreshAndGetLeaderWithTerm was used in order to change leader and thus primary 
replica. Now when Placement driver assigns primary replica it's no longer the 
case. All in all, some PlacementDriver#changePrimaryReplica or similar will be 
useful, at least within tests.
 


> Add ability to intentionally change primary replica
> ---------------------------------------------------
>
>                 Key: IGNITE-20365
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20365
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>
> Some tests, e.g. testTxStateReplicaRequestMissLeaderMiss expects primary 
> replica to be changed. Earlier when primary replica was collocated with 
> leader refreshAndGetLeaderWithTerm was used in order to change leader and 
> thus primary replica. Now when Placement driver assigns primary replica it's 
> no longer the case. All in all, some PlacementDriver#changePrimaryReplica or 
> similar will be useful, at least within tests.
>  
> *Implementation Details*
> +Important note:+ The lease contract prohibits intersecting leases. We don't 
> want to break this contract, so we will have to wait until the current lease 
> ends before another replica becomes primary.
> There are two ways to implement this functionality - either extend 
> {{PlacementDriver}} in the product or change only the test code. Looks like 
> the second approach is not enough if we start a test ignite instance using an 
> {{IgniteImpl}} class. So we might need to consider extend the production 
> code. Moreover, such change might become the first step towards a graceful 
> cluster reconfiguration.



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

Reply via email to