[PATCHES] Cleanup dead records in messages.tdb

Jeremy Allison jra at samba.org
Wed Apr 2 17:57:03 MDT 2014


On Wed, Apr 02, 2014 at 10:51:47AM +0200, Volker Lendecke wrote:
> On Tue, Apr 01, 2014 at 01:49:13PM -0700, Christof Schmitt wrote:
> > When a smbd process dies, pending messages.tdb records for this process
> > will not get cleaned up. I have seen one case where the messages.tdb
> > file grew very large after I/O requests were delayed and smbd child
> > processes died.
> > 
> > These patches implement cleanup of messages.tdb records that is
> > triggered after a smbd dies; any record with an invalid key or a
> > non-existing PID will get deleted.
> 
> Can we avoid the traverse in the normal case? Is it really
> that the smbds in your case left corrupt keys behind? In
> remove_child_pid we know which child died, so we could
> directly check and delete its record. Traverses always scare
> me :-)

OK, here is a version that doesn't traverse, but
only cleans up the records for the affected
pid.

Christof, it's based on your idea and Volker's
comments. Can you review and let me know what
you think ?

Thanks,

        Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-messages-Implement-cleanup-of-dead-records.patch
Type: text/x-diff
Size: 4484 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140402/bff86c8c/attachment.patch>


More information about the samba-technical mailing list