BIND 10 #2204: revise auth DataSourceConfiguratorGeneric::reconfigure()

BIND 10 Development do-not-reply at isc.org
Sat Aug 18 07:25:18 UTC 2012


#2204: revise auth DataSourceConfiguratorGeneric::reconfigure()
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:  task   |             Milestone:  New Tasks
                   Priority:         |            Resolution:
  medium                             |             Sensitive:  0
                  Component:         |           Sub-Project:  DNS
  b10-auth                           |  Estimated Difficulty:  0
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
  background zone loading            |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> A subtask of #2201, depend on #2203.
>
> This change will allow us to exclude the whole reconfigure() from a
> critical section protected by a lock in a later stage of this work.
>
> What to do are (there are many, but each should be pretty
> straightforward):
>
> - change type of `AuthSrvImpl::client_lists_` to a shared_ptr of map
> - don't reuse the existing client list: always create a new one
>   and builds it with the new config
> - pass reconfigure() an empty `map<RRClass, ConfigurableClientList(PTr)>`
>   and have reconfigure() fill in it with the entire new data source
>   client lists
> - introduce AuthSrv::setDataSourceClientLists().  It takes a shared
>   pointer to the new map created by reconfigure() and swaps it with the
>   current value of `AuthSrvImpl::client_lists_`, and returns the
>   old one.
> - Deprecate the current `AuthSrv::setClientList()` interface (we
>   don't need it any more)
> - revise the command handler (introduced in #2203) so it calls
>   reconfigure() with the new config and then call
>   setDataSourceClientLists() with the result.  For now, the old map
>   returned by setDataSourceClientLists() is just dropped at this
>   point (but the swap behavior will become important in #TBD)

New description:

 A subtask of #2201, depend on #2203.

 This change will allow us to exclude the whole reconfigure() from a
 critical section protected by a lock in a later stage of this work.

 What to do are (there are many, but each should be pretty
 straightforward):

 - change type of `AuthSrvImpl::client_lists_` to a shared_ptr of map
 - don't reuse the existing client list: always create a new one
   and builds it with the new config
 - pass reconfigure() an empty `map<RRClass, ConfigurableClientList(PTr)>`
   and have reconfigure() fill in it with the entire new data source
   client lists
 - introduce AuthSrv::setDataSourceClientLists().  It takes a shared
   pointer to the new map created by reconfigure() and swaps it with the
   current value of `AuthSrvImpl::client_lists_`, and returns the
   old one.
 - Deprecate the current `AuthSrv::setClientList()` interface (we
   don't need it any more)
 - revise the command handler (introduced in #2203) so it calls
   reconfigure() with the new config and then call
   setDataSourceClientLists() with the result.  For now, the old map
   returned by setDataSourceClientLists() is just dropped at this
   point (but the swap behavior will become important in #2210)

--

-- 
Ticket URL: <http://bind10.isc.org/ticket/2204#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list