[
https://issues.apache.org/jira/browse/IGNITE-18742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Denis Chudov updated IGNITE-18742:
----------------------------------
Description:
Maintenance phase of placement driver is the management of already existing
leases by the placement driver's active actor.
!screenshot-1.png!
Describing in words, there should be a worker triggered once in a period of
time equal to leaseInterval/2, that makes following:
1. it iterates over all partition groups managed by placement driver, and
either extends their leases or chooses new, if there is no lease for group for
some reason (it can be because leaseholder was never chosen, or actual
leaseholder left the cluster, etc.);
2. if there is no lease, it should be assigned using lease candidates balancer,
see IGNITE-18879 ;
3. new timestamp (let's name it leaseValidUntil) until which the lease will be
valid, should be calculated as currentTime + leaseInterval;
4. after that, placement driver should invoke meta storage to refresh data
about leases and their new leaseValidUntil timestamps;
5. if invoke is successful (it can be not if there are two nodes considering
themselves as the placement driver's active actors), LeaseGrantMessage
containing leaseValidUntil should be sent to leases and lease candidates;
6. lease candidate is able to decline LeaseGrantMessage and sent
LeaseGrantResponse with redirect proposal, containing alternative candidate.
This proposal should also be handled with lease candidates balancer and as a
result, following is possible:
6.1 previously chosen candidate is enforced: placement driver sends
LeaseGrantMessage(force=true) to the lease candidate
6.2 the proposed candidate is accepted by placement driver;
7. if lease candidate accepts it's role, the placement driver makes invoke to
meta storage, confirming new leaseholder and it's lease validness interval.
was:
Maintenance phase of placement driver is the management of already existing
leases by the placement driver's active actor.
!screenshot-1.png!
Describing in words, there should be a worker triggered once in a period of
time equal to leaseInterval/2, that makes following:
1. It iterates over all partition groups managed by placement driver, and
either extends their leases or chooses new, if there is no lease for group for
some reason (it can be because leaseholder was never chosen, or actual
leaseholder left the cluster, etc.).
2. If there is no lease, it should be assigned using lease candidates balancer,
see IGNITE-18879 .
3. New timestamp (let's name it leaseValidUntil) until which the lease will be
valid, should be calculated as currentTime + leaseInterval.
4. After that, placement driver should invoke meta storage to refresh data
about leases and their new leaseValidUntil timestamps.
5. If invoke is successful (it can be not if there are two nodes considering
themselves as the placement driver's active actors), LeaseGrantMessage
containing leaseValidUntil should be sent to leases and lease candidates.
6. Lease candidate is able to decline LeaseGrantMessage and sent
LeaseGrantResponse with redirect proposal, containing alternative candidate.
This proposal should also be handled with lease candidates balancer and as a
result, following is possible:
6.1 previously chosen candidate is enforced: placement driver sends
LeaseGrantMessage(force=true) to the lease candidate
6.2 the proposed candidate is accepted by placement driver.
7. If lease candidate accepts it's role, the placement driver makes invoke to
meta storage, confirming new leaseholder and it's lease validness interval.
> Implement logic for a maintenance phase of group lease management
> -----------------------------------------------------------------
>
> Key: IGNITE-18742
> URL: https://issues.apache.org/jira/browse/IGNITE-18742
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Priority: Major
> Labels: ignite-3
> Attachments: screenshot-1.png
>
>
> Maintenance phase of placement driver is the management of already existing
> leases by the placement driver's active actor.
> !screenshot-1.png!
> Describing in words, there should be a worker triggered once in a period of
> time equal to leaseInterval/2, that makes following:
> 1. it iterates over all partition groups managed by placement driver, and
> either extends their leases or chooses new, if there is no lease for group
> for some reason (it can be because leaseholder was never chosen, or actual
> leaseholder left the cluster, etc.);
> 2. if there is no lease, it should be assigned using lease candidates
> balancer, see IGNITE-18879 ;
> 3. new timestamp (let's name it leaseValidUntil) until which the lease will
> be valid, should be calculated as currentTime + leaseInterval;
> 4. after that, placement driver should invoke meta storage to refresh data
> about leases and their new leaseValidUntil timestamps;
> 5. if invoke is successful (it can be not if there are two nodes considering
> themselves as the placement driver's active actors), LeaseGrantMessage
> containing leaseValidUntil should be sent to leases and lease candidates;
> 6. lease candidate is able to decline LeaseGrantMessage and sent
> LeaseGrantResponse with redirect proposal, containing alternative candidate.
> This proposal should also be handled with lease candidates balancer and as a
> result, following is possible:
> 6.1 previously chosen candidate is enforced: placement driver sends
> LeaseGrantMessage(force=true) to the lease candidate
> 6.2 the proposed candidate is accepted by placement driver;
> 7. if lease candidate accepts it's role, the placement driver makes invoke to
> meta storage, confirming new leaseholder and it's lease validness interval.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)