Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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.
Definition of Done
Need to ensure event handling linearization. All immediate data nodes recalculation must be returned to the event handler.
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.
Attachments
Issue Links
- is a child of
-
IGNITE-17924 Core distributions zones functionality.
- Open
- relates to
-
IGNITE-20310 Meta storage invokes are not completed when DZM start is completed
- Resolved
- links to