[RFC] tdb_traverse_read_lite()

Stefan (metze) Metzmacher metze at samba.org
Tue Mar 5 05:33:18 MST 2013


Am 05.03.2013 13:04, schrieb Volker Lendecke:
> On Mon, Mar 04, 2013 at 05:57:15PM +1030, Rusty Russell wrote:
>> Volker Lendecke <Volker.Lendecke at SerNet.DE> writes:
>>> On Thu, Feb 28, 2013 at 02:11:18PM +1030, Rusty Russell wrote:
>>>> Amitay asked me to look at a lightweight traverse for tdb.  This is my
>>>> first attempt (against his ctdb tree, but it's pretty simple).
>>>
>>> What about doing a traverse by chain? Sure, not atomic
>>> whatsoever, but potentially even less intrusive.
>>>
>>> Volker
>>
>> I'm not sure what you mean... this traverses one chain at a time, but it
>> holds the lock for that chain across the traverse function.
> 
> Attached find a version of your code that actually applies
> against master and builds there.
> 
> In particular for the vacuuming code in ctdb I think it
> might be valuable to have a traverse function that is even
> lighter. The traverse_read_chain might even be optionally
> non-blocking. This way ctdb could much better control to
> spend x % of its time in vacuuming or could be more generous
> to other daemons on the system in a high-load situation. It
> could walk all chains that are not locked and only if a
> chain was not taken care of for n seconds it could try the
> blocking variant.

I'd also prefer a chain traverse function, that could be used
in a lot of places to reduce the cleanup costs.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130305/42794fef/attachment.pgp>


More information about the samba-technical mailing list