Task #4127

Rebuild the LSDB

Added by Nicholas Gordon over 4 years ago. Updated 8 months ago.

In Progress
Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)


The LSDB is verbose and repetitive, and it can be better designed to be more concise and readable.


list-sort-set-benchmark.cpp (898 Bytes) list-sort-set-benchmark.cpp Junxiao Shi, 01/23/2018 09:17 AM


Task #4235: Simplify LSDB Dataset Interest Handler and LSA PublisherClosedNicholas Gordon08/09/2017

Task #4264: Increase independence of SyncLogicHandler.Closed

Task #4335: SyncLogicHandler should use an "oracle" funciton to determine LSA newnessRejectedNicholas Gordon

Task #4620: Update NLSR Developer's guide to reflect re-built LSDB.New


Related issues

Blocked by NLSR - Task #2741: Create proposal to redesign a more generic LSDBClosedMuktadir Chowdhury08/09/2017


Updated by Nicholas Gordon over 3 years ago

  • Target version changed from v0.5.0 to Minor release 0.4.1
  • Parent task deleted (#2741)

Updated by Nicholas Gordon over 3 years ago

  • Blocked by Task #2741: Create proposal to redesign a more generic LSDB added

Updated by Ashlesh Gawande over 3 years ago

  • Target version changed from Minor release 0.4.1 to v0.5.0

Updated by Ashlesh Gawande almost 3 years ago

  • Assignee changed from Nicholas Gordon to Saurab Dulal
  • Target version changed from v0.5.0 to v0.6.0

Updated by Ashlesh Gawande over 1 year ago

  • Assignee changed from Saurab Dulal to Ashlesh Gawande patch-set 11 makes minimum changes to replace the three std::list used for Lsas with the proposed boost::multi_index container in previous patch-sets. Although it does not separate LsaFetcher and LsaPublisher as the previous patch-sets, it still reduces the Lsdb from ~1300 lines to ~630 lines with templating and polymorphism. Changes outside the Lsdb are kept to a minimum for easier review and have all the tests be passed w/ minimum modifications.
Other refactoring can follow as desired after the basic premise of this change of using a single multi_index container for Lsdb is achieved.

Some highlights that may need explicit review:

  • Block m_wire is eliminated from child LSA classes and now resides in LSA base class (replacing the m_baseWire). These were introduced in #4787
  • LSA base class has a public pure virtual wireEncode() - this maybe not desired in a library, but I think having it in NLSR is perfectly fine. wireEncode(block) and wireDecode(block) are protected, to be used by child classes.

Updated by Saurab Dulal 9 months ago

  • Target version changed from v0.6.0 to 0.7.0

Updated by Ashlesh Gawande 8 months ago makes the following changes to simplify Lsdb further:

  • Lsdb emits a signal containing a pointer to Lsa, an update type (Inserted, Updated, Removed), and two lists of Names
    • List of Names are only relevant to NameLsa update - Names to be removed and Names to be added.
    • Lsa base class now has a pure virtual update function so that Lsdb does not need to cast the pointer and then call functions according to each Lsa
  • RoutingTable consumes the Lsdb signal
    • Behaviours which were in Lsdb such as removing routing table if own Adjacency Lsa is removed are moved to RoutingTable
    • Resets wire when routing table is updated (seems like current code does not - so will return old routing table once calculated)
    • calculate function in RoutingTable is simplified
  • NamePrefixTable consumes the Lsdb signal
    • Adds/Removes origin router of LSAs
    • Adds/Removes updates from NameLsa

Unit tests are added to test that the behavior upon signal emission/consumption is correct in Lsdb, RoutingTable and NamePrefixTable

Also available in: Atom PDF