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

RE: slapd internal API change

> -----Original Message-----
> From: Jonghyuk Choi [mailto:jongchoi@us.ibm.com]

> Using a single interface and possible a single function for different
> is a good idea indeed... now it became much easier to manage callback
> functions.

That was my thought. I'll make this change soon.
> And, thanks for the psearch-search integration.
> One question is about having LCUP and SYNC related fields
> (o_clientupdate, o_clientupdate_type, o_clientupdate_interval,
> o_clientupdate_state, o_sync,
> o_sync_mode, o_sync_state) as the members of req_search_s ?
> Options include 1) to have a private pointer in each req_????_s or
> 2) to have a pointer to the LCUP/SYNC data structure in req_search_s.

I'd lean toward (2) since most searches won't use these fields.

> I'll make the LCUP / SYNC use the same structure member
> instead of having them separately.

Sounds good.

> IS_PSEARCH does not seem to be required, because we can get the same
> information from sop->o_clientupdate_type or sop->o_sync_mode.

OK. It seemed to me that the behavior needed to be different when answering a
direct search (non-persist) vs when add/mod/del were sending out a persist
response, but I didn't spend too much time trying to understand it. I was
particularly unsure about when the actual search attrs were being used, vs
the uuid_attr or null_attr. I believe in most cases rs.sr_attrs only needs to
be set once, at the top of the search loop. It's only the alternating between
null_attr and search attrs that still needs to be managed.
> BTW, removing #ifdefs around LCUP / SYNC code will make the
> search code cleaner.

> If you're done with the API change infrastructure, then I'll
> start refining the psearch-search integration.

Go ahead. I think the only other change I'll make here is to move
rs.sr_nentries into the rep_search_s and have send_search_entry increment
this itself. I can patch that change in whenever, no special dependencies

> thanks again !
> - Jong
> ------------------------
> Jong Hyuk Choi
> IBM Thomas J. Watson Research Center - Enterprise Linux Group
> P. O. Box 218, Yorktown Heights, NY 10598
> email: jongchoi@us.ibm.com
> (phone) 914-945-3979    (fax) 914-945-4425   TL: 862-3979

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support