futurewei-cloud / alcor

Alcor: Cloud native SDN platform powered by Kubernetes and Istio
MIT License
32 stars 33 forks source link

[DPM] Conflict between Set<> for host ips and List<> for VPC ids in MulticastGoalStateV2 #722

Closed VanderChen closed 2 years ago

VanderChen commented 2 years ago

The data struct for host ips is changed from List to HashSet for MulticastGoalStateV2 in PR #713 (related to issue #716 ). This change removed the duplicate ip, but caused another problem. When we use the Pulsar client to send a multicast goal state, multiple pairs of VPC id and host ip will be used. However, the size of List(VPC ids) and Set(host ips) may be different.

An alternative solution is change List to String for VPC ids. As far as I know, a multicast goal state is only created under three situations for now.

  1. process port config, multiGS will be created for neighbor info.
  2. process neighbor info
  3. process router In the above three situations, the network config belongs to only one VPC. In other words, in a Multi GS, one VPC Id is enough.

Another alternative solution is also change List to Set for VPC ids. Since the location of set host IP and VPC ID are different, we cannot guarantee the correspondence between the two. (In the previous design, they relied on the order of the list to ensure the corresponding relationship)

VanderChen commented 2 years ago

This issue should be linked to PR #728