Kirill Gusakov created IGNITE-16063:
---------------------------------------
Summary: Update partition assignments on rebalance triggers
Key: IGNITE-16063
URL: https://issues.apache.org/jira/browse/IGNITE-16063
Project: Ignite
Issue Type: Task
Reporter: Kirill Gusakov
According to an algorithm from
https://issues.apache.org/jira/browse/IGNITE-16020, we need to support
partition assignments updates when:
- baseline changed
- number of partition replicas changed
This update needs metastore multi-invoke feature and can be described as:
{code}
onBaselineEvent:
for table in tableCfg.tables():
for partition in table.partitions:
<inline metastoreInvoke>
onReplicaNumberChange:
with table as event.table:
for partitoin in table.partitions:
<inline metastoreInvoke>
metastoreInvoke: // atomic metastore call through multi-invoke api
if empty(partition.change.trigger.revision) ||
partition.change.trigger.revision < event.revision:
if empty(partition.assignments.pending) && partition.assignments.stable
!= calcPartAssighments():
partition.assignments.pending = calcPartAssignments()
partition.change.trigger.revision = event.revision
else:
if partition.assignments.pending != calcPartAssignments
partition.assignments.planned = calcPartAssignments()
partition.change.trigger.revision = event.revision
else
remove(partition.assignments.planned)
else:
skip
{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)