[ https://issues.apache.org/jira/browse/IGNITE-20317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mirza Aliev updated IGNITE-20317: --------------------------------- Epic Link: IGNITE-20611 (was: IGNITE-20166) > Meta storage invokes are not completed when events are handled in DZM > ---------------------------------------------------------------------- > > Key: IGNITE-20317 > URL: https://issues.apache.org/jira/browse/IGNITE-20317 > Project: Ignite > Issue Type: Bug > Reporter: Sergey Uttsel > Assignee: Mirza Aliev > Priority: Major > Labels: ignite-3 > > h3. *Motivation* > There are meta storage invokes in DistributionZoneManager in zone's > lifecycle. The futures of these invokes are ignored, so after the lifecycle > method is completed actually not all its actions are completed. Therefore > several invokes for example on createZone and alterZone can be reordered. > Currently it does the meta storage invokes in: > # ZonesConfigurationListener#onCreate to init a zone. > # ZonesConfigurationListener#onDelete to clean up the zone data. > # DistributionZoneManager#onUpdateFilter to save data nodes in the meta > storage. > # DistributionZoneManager#onUpdateScaleUp > # DistributionZoneManager#onUpdateScaleDown > -DistributionZoneRebalanceEngine#onUpdateReplicas to apdate assignment on > replicas update.- > -LogicalTopologyEventListener to update logical topology.- > -DistributionZoneRebalanceEngine#createDistributionZonesDataNodesListener > watch listener to update pending assignments.- > h3. *Definition of Done* > Need to ensure event handling linearization. All immediate data nodes > recalculation must be returned to the event handler. > h3. *Implementation Notes* > * ZonesConfigurationListener#onCreate, ZonesConfigurationListener#onDelete, > DistributionZoneManager#onUpdateFilter and > DistributionZoneRebalanceEngine#onUpdateReplicas are invoked in configuration > listeners. So we can just return the ms invoke future from these methods > and it ensure, that this invoke will be completed within the current event > handling. > * We cannnot return future from LogicalTopologyEventListener's methods. We > can ignore these futures. It has drawback: we can skip the topology update > # topology=[A,B], dataNodes=[A,B], scaleUp=0, scaleDown=100 > # Node C was joined to the topology and left quickly and ms invokes to update > topology entry was reordered. > # data nodes was not updated immediately to [A,B,C]. > We think that we can ignore this bug because eventually it doesn't break the > consistency of the date node. For this purpose we need to change the invoke > condition: > `value(zonesLogicalTopologyVersionKey()).lt(longToBytes(newTopology.version()))` > instead of > `value(zonesLogicalTopologyVersionKey()).eq(longToBytes(newTopology.version() > - 1))` > * Need to return ms invoke futures from WatchListener#onUpdate method of the > data nodes listener. -- This message was sent by Atlassian Jira (v8.20.10#820010)