Store extended info for BLQ in SQL databases
Discussion opened in !1821 (comment 328463).
There is a need to store remote-id and other extended info in the lease database. There are at least two possible approaches:
-
updates - once a lease is created, lease-update is used to extend its user context with extra info, such as remote-id. This is what we implemented for memfile. It worked well, because the price to update memfile is negligible. The benefit of this approach is its relative simplicity and uniformity between backends. The drawback is that it makes multiple additional round trips to the DB. In extreme case, such as client getting 2 addresses and a prefix and there's remote-id and subscriber-id configured, there would be 6 extra DB queries.
-
trigger-based - the alternative approach is to use DB triggers to update the data. This is slightly more complicated (need to understand how triggers work and how to disable them when BLQ is not used). The benefit is, however, no extra round trip times for the DB.
For the sake of time constraints, let's go with approach 1 for now. If users complain the solution is not performant enough, we will implement 2.