Opened 4 years ago

Last modified 3 years ago

#4536 new enhancement

Unused calls in LeaseMgr and DataSource should be removed

Reported by: tomek Owned by:
Priority: medium Milestone: Outstanding Tasks
Component: database-all Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


With recent changes the code uses get(identifier-type, identifier, subnet-id) calls to locate reservations. As such, many of the other get(...) calls are not needed. These are used either in tests only or not used at all. They should be removed.

Also, similar situation is with LeaseMgr?. This was discovered during a customer developer's training. We were going through memfile calls and some of them simply iterate over all leases. This is horribly inefficient and they were surprised this doesn't impact the actual performance measured in their network. The reason is because those calls are not used at all. They should be removed as well.

Having those calls removed is essential for having clean code for backends and will make implementation of additional backends easier.


Change History (3)

comment:1 Changed 4 years ago by hschempf

  • Milestone changed from Kea-proposed to Outstanding Tasks

Per July 7 meeting, move to outstanding

comment:2 Changed 4 years ago by tomek

Comment in #4277 suggests:

I'm not sure, but it seems likely that the following calls are
to be removed:

  • getAll(hwaddr, duid)
  • get4(subnet-id, hwaddr, duid)
  • get6(subnet-id, duid, hwaddr)
  • get6(prefix, prefix-len)

comment:3 Changed 3 years ago by tomek

  • Summary changed from Unused called in LeaseMgr and DataSource should be removed to Unused calls in LeaseMgr and DataSource should be removed
Note: See TracTickets for help on using tickets.