[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6276) paused pool can deadlock if writers are waiting

h.b.furuseth@usit.uio.no writes:
> Then we could add the option (c) a *small* set of (groups of?) config
> variables which each will need their own mutex or pause or something.
> Such as loglevel, since the code is doing Debug() all over the place.

I forgot:  Simplest way here is to have two versions of the variable:
the one accessed by cn=config, and a copy which is the one slapd obeys.

The cn=config variable is pause-protected as usual, and slapd copies it
to the active variable at its leisure.  This will be acceptable for
config changes that cannot fail once the value has been verified and
need not take effect immediately.  Then the copy task needs locks both
for the configurable variable ("lock" = prevent_pause() ... "unlock" =
allow_pause()?) and for the active variable, but not at the same time.