[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: commit: ldap/servers/slapd/overlays pcache.c
> Pierangelo Masarati wrote:
>
> > Howard Chu wrote:
> >
> >> ando@OpenLDAP.org wrote:
> >>
> >>> Update of /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays
> >>>
> >>> Modified Files:
> >>> pcache.c 1.26 -> 1.27
> >>>
> >>> Log Message:
> >>> cache backend was not started up
> >>
> >>
> >>
> >> This is not correct; the backend does get started. In pcache.c at line
> >> 1666:
> >> /* This type is in use, needs to be opened */
> >> cm->db.bd_info->bi_nDB++;
> >>
> >> This setting causes the backend type (backendInfo->bi_open) to be
> >> opened in backend_startup. The overlay itself handles the
> >> backend->bi_db_open.
> >
> >
> > Well, my problem was that pcache with bdb/hdb was failing because
> > be_context_csn was null
> > for the cache database, and bdb plays with its DN without checking if
> > it's valid (I added an
> > assert in back-bdb/ctxcsn.c), so my guess was that it didn't get
> > initialized when backend_startup()
> > is called. I tried directly calling backend_startup() for that database
> > (my initial commit) but then
> > realized that all backends and databases were initialized twice, which
> > is bad (actually, back-ldbm
> > was mostly complaining because ldbm_initialize() can be called only
> > once). So I'm at a loss: tests
> > always ran fine, and now pcache test is telling me that be_context_csn
> > is NULL. I wonder if
> > back-bdb should ever use it when acting as a proxy cache, but I don't
> > want to muck with back-bdb
> > internals at the moment.
>
> I've checked in a smaller patch for this. Sorry, my default test didn't
> have proxycache enabled last time around but I'm running it now (and
> it's fine).
> --
> -- Howard Chu
> Chief Architect, Symas Corp. Director, Highland Sun
> http://www.symas.com http://highlandsun.com/hyc
> Symas: Premier OpenSource Development and Support
backend_startup() has to check whether bi_open() was previously called.
Then, Ando's original way of not duplicating code would work....
Also, is it okay not to call acl_append() when non-NULL be is given to
backend_startup() ?
- Jong-Hyuk