bhouse-nexthop commented on code in PR #14640:
URL: https://github.com/apache/cloudstack/pull/14640#discussion_r4770208020
##########
core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java:
##########
@@ -89,8 +90,12 @@ public class VirtualRoutingResource {
protected Logger logger = LogManager.getLogger(getClass());
private VirtualRouterDeployer _vrDeployer;
+ // Agent request threads run in parallel, so these maps are synchronized.
The aggregation maps are
+ // only read and changed for a router while holding that router's lock
from _vrLockMap.
private Map<String, Queue<NetworkElementCommand>> _vrAggregateCommandsSet;
Review Comment:
Done in 1a9c8b4d67: the comment is now on the field itself.
##########
core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java:
##########
@@ -89,8 +90,12 @@ public class VirtualRoutingResource {
protected Logger logger = LogManager.getLogger(getClass());
private VirtualRouterDeployer _vrDeployer;
+ // Agent request threads run in parallel, so these maps are synchronized.
The aggregation maps are
+ // only read and changed for a router while holding that router's lock
from _vrLockMap.
private Map<String, Queue<NetworkElementCommand>> _vrAggregateCommandsSet;
- protected Map<String, Lock> _vrLockMap = new HashMap<String, Lock>();
+ // Router name -> failure details of the last aggregated apply on it, if
that apply failed
+ private Map<String, String> _vrAggregateFailures;
Review Comment:
Renamed to `aggregatedApplyFailurePerRouter` in 1a9c8b4d67, without the
underscore, and its comment says it holds one failure per router, not one per
aggregation. Keeping one failure per aggregation needs the aggregation id,
which we agreed to leave for a separate change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]