1、Retry Logic OptimizationYijiao Qin Alibaba CloudWorkflow to install BGP routesConstraintsProblem Statement-too many pending entriesImpact on Retry ProcessProposal-separate those not readyOptimized retry processOffload to Retry CacheRestore to SyncMap Constraint Representation1.Determine which types
2、of constraints need special handling.2.Represent a specific cst by a pair of predefined type and value.e.g.(CST_NEXT_HOP_GROUP,“1”)2.2.Extend the constraint types per requirementsenum ConstraintType RETRY_CST_NHG,/nhg doesnt exist RETRY_CST_NHG_REF,/nhg refcnt nonzero RETRY_CST_ECMP /ecmp resources
3、exhausted;Failed Task Representation1.Determine when to move a failed task to Retry Cache.p.s.Without affecting original logic flow for other features.2.Store the constraint information into Retry Cache.Efficiency Requirement1.Failed tasks are stored in retry cache safely.-Should not be forgotten or
4、 left in the retry cache forever-Can be restored back to SyncMap2.Retry cache can be queried and cleared efficiently.-Assistant internal maps and sets are used.In-time Notification1.Pay attention to when the constraints could be satisfied.2.Notifications of cst resolution should be sent to Retry Cac
5、he immediately.RetryMap Data StructureRetryKeysMapSet of Resolved ConstraintsGlobal SyncMap Retry Process-Check all resolved constraints-Move all related tasks back to SyncMap-Clear unreferenced constraints-If a task is actually blocked by several constraints-Only one cst is handle at a timePreproce
6、ssing on New TasksCheck tasks in RetryMap with the same key as the new task:One Found1.discard the new,if same as the one in RetryMap2.if DEL,delete the one in RetryMap3.if SET,move the old task from RetryMap to SyncMap for later mergeTwo F