tdb question

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jan 31 20:50:30 GMT 2008


On Thu, Jan 31, 2008 at 12:40:42PM -0800, Herb Lewis wrote:
> I have a tdb opened by several processes. I want one process
> to basically delete all the current entries and rebuild the
> tdb with new entries. What is the best way to do this? Should
> I just call tdb_writelock, traverse the tdb to delete all existing
> records then store the new ones and call tdb_writeunlock, or is
> there some better way using transactions? Will other process
> calls to tdb_fetch block or return an error while it is locked?

If you don't have too many records (i.e. at most thousands,
not millions), a tdb transaction might be best. Then you
can always bail out.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080131/a2e3e9d5/attachment.bin


More information about the samba-technical mailing list