Uploaded image for project: 'ovsdb'
  1. ovsdb
  2. OVSDB-490

Improve transactions dispatch

XMLWordPrintable

      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

       

            Avishnoi Anil Vishnoi
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: