[PATCH] CTDB protocol and client fixes
Stefan Metzmacher
metze at samba.org
Tue Nov 24 11:17:43 UTC 2015
Am 24.11.2015 um 10:15 schrieb Volker Lendecke:
> On Tue, Nov 24, 2015 at 07:35:32PM +1100, Amitay Isaacs wrote:
>>> If the sync APIs are only ever called inside ctdb tool or
>>> tests, why is the additional overhead a problem?
>>>
>>
>> The problem is not of the overhead. Since the API is designed around
>> single tevent_fd, you always need the same event context around. Otherwise
>> you end up having to do tevent_add_fd() in each sync API. This is even
>> trickier since the tevent_add_fd() is burried in a lower level abstraction
>> (comm).
>
> In the smb libraries and others, look at tsocket, we have started from
> the basic socket calls to not cache a tevent_fd.
In tstream_bsd_set_writeable_handler and tstream_bsd_set_readable_handler
we do some tevent_fd caching.
If the same tevent_context is used multiple times in a row,
we reuse the tevent_fd, we're also lazy in changing its flags.
That might be also a possible mode for the ctdb client code.
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151124/1c4d1236/signature.sig>
More information about the samba-technical
mailing list