... | ... | @@ -654,47 +654,38 @@ There is a quasi-related issue https://gitlab.isc.org/isc-projects/kea/-/issues/ |
|
|
|
|
|
The work breaks down into two parallel tracks: Query fulfillment and LeaseQueryListener implementation. They interface at LeaseMgr query functions, and these should be stubbed early on. A preliminary task break down is shown below:
|
|
|
|
|
|
```
|
|
|
1. Query Fulfillment
|
|
|
1.1 Kea core and/or leasequery hook changes to store explicit parameters in user-context
|
|
|
1.2 Define new LeaseMgr query functions
|
|
|
Several query wrapper functions need to be added to support the new queries
|
|
|
(e.g. queryLeasesByRemoteId6, queryLeasesByRelayId4, etc..) See #2571
|
|
|
|
|
|
1.3 Memfile Lease Mgr
|
|
|
a. New index(es) using predicate objects
|
|
|
b. V6 cross-reference multi-index container
|
|
|
c. Implement new query functions
|
|
|
|
|
|
1.4 MySQL Lease Mgr
|
|
|
a. V4 Generated columns/indexes (schema + SQL queries)
|
|
|
b. V6 Cross-reference table and triggers (schema + SQL queries)
|
|
|
c. Implement new query functions
|
|
|
|
|
|
1.5 PostgreSQL Lease Mgr
|
|
|
a. Change lease4/6 user_context column from TEXT to JSONB, update existing SQL
|
|
|
as needed
|
|
|
b. V4 JSONB/GIN (schema + SQL queries)
|
|
|
c. V6 JSONB/GIN (schema + SQL queries)
|
|
|
d. Implement new query functions
|
|
|
- 1.1 Kea core and/or leasequery hook changes to store explicit parameters in user-context
|
|
|
- 1.2 Define new LeaseMgr query functions Several query wrapper functions need to be added to support the new queries (e.g. queryLeasesByRemoteId6, queryLeasesByRelayId4, etc..) See #2571
|
|
|
- 1.3 Memfile Lease Mgr
|
|
|
- a. New index(es) using predicate objects
|
|
|
- b. V6 cross-reference multi-index container
|
|
|
- c. Implement new query functions
|
|
|
- 1.4 MySQL Lease Mgr
|
|
|
- a. V4 Generated columns/indexes (schema + SQL queries)
|
|
|
- b. V6 Cross-reference table and triggers (schema + SQL queries)
|
|
|
- c. Implement new query functions
|
|
|
- 1.5 PostgreSQL Lease Mgr
|
|
|
- a. Change lease4/6 user_context column from TEXT to JSONB, update existing SQL as needed
|
|
|
- b. V4 JSONB/GIN (schema + SQL queries)
|
|
|
- c. V6 JSONB/GIN (schema + SQL queries)
|
|
|
- d. Implement new query functions
|
|
|
|
|
|
2. LeaseQueryListener
|
|
|
2.1 Create the initial class hierarchy from CmdHttpListener hierarchy
|
|
|
a. HttpThreadPool -> IoServiceThreadPool, this class could probably be in asiolink, there
|
|
|
- 2.1 Create the initial class hierarchy from CmdHttpListener hierarchy
|
|
|
- a. HttpThreadPool -> IoServiceThreadPool, this class could probably be in asiolink, there
|
|
|
really is nothing in it that is HTTP or even TCP specific. It's really a pool of IOService
|
|
|
driven threads. - #2581
|
|
|
b. HttpListener* -> TcpListener*, these classes could reside in asiolink and possibly also be used
|
|
|
- b. HttpListener* -> TcpListener*, these classes could reside in asiolink and possibly also be used
|
|
|
as base classes for Http code, though this would be ancillary to making BLQ work. - #2583
|
|
|
c. Derive LeaseQueryConnection from TcpConnection - #2639
|
|
|
d. CmdHttpListener -> LeaseQueryListener, self explanatory - #2635 created MtTcpListenerMgr from CmdHttpListener. LeaseQueryListener will derive from (or perhaps be an instance of) this class.
|
|
|
|
|
|
2.2 Implement LeaseQueryConnection packet read and write logic (i.e. replace Transaction logic) - #2639
|
|
|
2.3 Implement BulkLeaseQuery, XidQuery, XidResponse classes
|
|
|
2.4 Implement query queueing and QueryWorker, QueryWorker management
|
|
|
2.5 Utilize LeaseMgr BLQ interface to fetch results and build responses
|
|
|
- c. Derive LeaseQueryConnection from TcpConnection - #2639
|
|
|
- d. CmdHttpListener -> LeaseQueryListener, self explanatory - #2635 created MtTcpListenerMgr from CmdHttpListener. LeaseQueryListener will derive from (or perhaps be an instance of) this class.
|
|
|
- 2.2 Implement LeaseQueryConnection packet read and write logic (i.e. replace Transaction logic) - #2639
|
|
|
- 2.3 Implement BulkLeaseQuery, XidQuery, XidResponse classes
|
|
|
- 2.4 Implement query queueing and QueryWorker, QueryWorker management
|
|
|
- 2.5 Utilize LeaseMgr BLQ interface to fetch results and build responses
|
|
|
|
|
|
3. LeaseQuery Hook/Integration
|
|
|
3.1 Add callouts as needed
|
|
|
3.2 Extend configuration parsing
|
|
|
3.4 Instantiate LeaseQueryListener (when enabled)
|
|
|
``` |
|
|
- 3.1 Add callouts as needed
|
|
|
- 3.2 Extend configuration parsing
|
|
|
- 3.4 Instantiate LeaseQueryListener (when enabled) |