If multiple updates are received for the same object, schema transformer should not reprocess everything again
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
R3.2 |
Fix Committed
|
Undecided
|
Sachin Bansal | |||
Trunk |
Fix Committed
|
Undecided
|
Sachin Bansal |
Bug Description
Currently, if schema transformer (or any config daemon) receives an update on an object, regardless of anything of interested being changed on an object or not, it runs dependency tracker again on the object, and reprocesses everything. If an object is connected to a large number of objects, this could result in unnecessary reprocessing multiple times.
As an example, lets say, VN object changed at t0, t1, t2, t3, t4 time points. Schema transformer started would run dependency tracker at t0, and start processing. Lets say, that processing finishes at t5 (after t4). In the current code, we will run dependency tracker 4 more times (once each for t1, t2, t3 and t4), even though running only once would have sufficed.
As a solution, we should track the fields schema transformer is interested in, and when an update is received, it should read those (and only those) fields for the object, compare against previously cached values and if no change is detected, then terminate dependency tracker and subsequent reprocessing.
Review in progress for https:/ /review. opencontrail. org/29898
Submitter: Sachin Bansal (<email address hidden>)