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

Re: overlay and failover

> I'm playing with overlays, and I need to deal with errors
> while doing some DN/attr rewrite/remap.  If I need to return
> an error result from inside an over_op_func(), I cannot use
> send_ldap_*() funcs because they try to call the overlay
> response infrastructure, which is corrupted because
> over_op_func() puts its own copy of the backend data/info
> in op->o_bd.  If I simply return an error code, the client
> hangs. What is the suggested approach, or how could
> we implement a mechanism to abort an operation from inside
> an overlay?  Am I missing anything?

I note that over_op_func() casts a  slap_overinst* in bd_info
before calling each overlay's function, but then a slap_overinfo*
structure is read from bd_info; this is harmless as soon as
each function simply uses it as a BackendInfo*, but it becomes
a crasher if one calls any response function from an overlay.
I guess any slap_overinst should contain slap_overinfo as a
subset to allow either cast; or, at least, a cast to either
should allow a safe retrieval of oi_list.


Pierangelo Masarati