[PATCH] CTDB protocol and client fixes
martin at meltin.net
Tue Nov 24 08:53:43 UTC 2015
On Tue, 24 Nov 2015 07:48:44 +0100, Volker Lendecke
<Volker.Lendecke at SerNet.DE> wrote:
> On Tue, Nov 24, 2015 at 05:33:23PM +1100, Amitay Isaacs wrote:
> > Since no one has replied to this email, let me summarize.
> > 1. For some reason I cannot fathom, async processing is treated *different*
> > from sync processing. A global event context for all async processing is
> > ok, but for sync processing need lots of temporary contexts.
> When you use tevent_loop_once deep inside the call stack where some
> other tevent_loop_once is also active, anything can happen. As long as
> callers work without tevent_loop_allow_nesting then it might be workable.
I think that's the key here: no tevent_loop_allow_nesting().
There are 2 options:
* Disallow nested event loops at compile time by not passing an
event context around. Then you need to create temporary event
contexts, do repeated set-up and tear-down and, depending on whose
eyes you are looking with, you end up with more complexity.
* Do the setup once, use generic packet processing under the hood and
let tevent's run-time nesting detection catch the nesting if someone
writes bad code.
I felt very peaceful yesterday when I understood both options and
agreed with them both. ;-)
peace & happiness,
More information about the samba-technical