BIND 10 #2861: synchronization between auth main thread and datasrc builder

BIND 10 Development do-not-reply at isc.org
Tue Mar 19 16:35:47 UTC 2013


#2861: synchronization between auth main thread and datasrc builder
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |                       Status:  new
            Priority:  medium        |                    Milestone:
           Component:  b10-auth      |  Previous-Sprint-Proposed
            Keywords:                |                   Resolution:
           Sensitive:  0             |                 CVSS Scoring:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  4             |  Feature Depending on Ticket:
         Total Hours:  0             |  shared memory data source
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:2 vorner]:
 > I guess the main thread should not be blocked during the initial load
 (otherwise it would be just straight-forward use of conditional variable).

 Right (the main thread should still be able to accept commands or any
 config updates, and in the case of reconfiguring data source, it
 should obviously keep handling queries).

 > Maybe have some other trigger instead of timer? Does ASIO allow sending
 work from other thread? Or something like a self-pipe?

 Using an ASIO event is probably cleanest, design-wise.  The issue in
 that case is we're currently using ASIO in not thread-safe way:

 # Disable threads: Currently we don't use them.
 CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_THREADS=1"

 According to the history (#345) it seems to be for minimizing build
 time dependency, so we could probably loosen it.  But enabling thread
 support often causes unexpected side effects, so I'm not sure if we
 want to trigger it just because of this.

 The issue of other synchronous communication such as a pipe is that
 how the main thread can check it; the main thread is normally sleeping
 in the ASIO event loop (unless it's a super busy server handling
 queries all the time), so we'll need something like an ASIO event
 posted by the other thread or timer based polling anyway.

-- 
Ticket URL: <https://bind10.isc.org/ticket/2861#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list