[OVSDB-490] Improve transactions dispatch Created: 05/Dec/19  Updated: 05/Dec/19

Status: Open
Project: ovsdb
Component/s: Library, Southbound.hw_vtep, Southbound.Open_vSwitch
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Low
Reporter: Robert Varga Assignee: Anil Vishnoi
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The code to dispatch transaction effects is duplicated across hwvtep/ovs code, both sharing the same structure:

  1. there is a base AbstractTransactionCommand which holds schema and updates (and specialization for the particular southbound)
  2. there is a set of commands subclassing it and calling TyperUtils to process updates
  3. there is a top-level aggregator, which calls each of the command to select its effects

Aside from the obvious code duplication, there is processing overhead, as we process the updates multiple times - i.e. for each command. Furthermore some commands have overlap on what data they are processing, for example PhysicalLocator updates are processed in HwvtepUcastMacsLocalUpdateCommand, HwvtepMcastMacsLocalUpdateCommand, HwvtepPhysicalLocatorRemoveCommand, etc. etc.

The library should provide a basic harness in form of:

  • a protocol-agnostic base command, which would expose the tables it is interested in
  • a protocol-agnostic base aggregator, which would examine all commands and build the required dataset and dispatch the modules (towards a protocol-specific abstract method)
  • the required dataset should also be better decomposed - it seems command logic is looking for before- and after-state, but for some things we may want a delta access

 


Generated at Wed Feb 07 20:36:32 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.