tdb question

Herb Lewis hlewis at
Fri Feb 1 00:54:17 GMT 2008

I don't see tdb_wipe_all in the 3_0 code only 3_2. Are there
other changes in 3_2 that are needed or could just that function
be copied to 3_0?

tridge at wrote:
> Herb,
>  > So is there some api call that I'm missing to delete all
>  > entries or would I still need to do the traverse/delete
>  > between transaction start/commit?
> You should definately use a transaction. If you use the latest tdb
> code that I have committed over the last few weeks then it doesn't
> matter how many records you modify in a transaction (I've fixed the
> O(n^2)) behaviour. It is actually much faster to do lots of modifies
> in a transaction and then commit than it is to do the operations
> outside a transaction, as it doesn't need to lock on each
> operation. It also means you never expose a half-modified database to
> other processes - so you can do huge modifies on a live database.
> To wipe the whole database inside the transaction use
> tdb_wipe_all(). This is _much_ faster than a traverse/delete. 
> Cheers, Tridge

More information about the samba-technical mailing list