s3-smbd: add a rate limited cleanup of brl, connections and locking db
commitf215147364f6c39e44d3a986a03214c294946197
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 Feb 2010 05:08:56 +0000 (5 21:08 -0800)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Apr 2010 07:39:13 +0000 (1 09:39 +0200)
tree49fddfe524dc6da1806c0dc397728756a466aa07
parentb4bfadbf5132d0fe63c8c521f18531df9a09a150
s3-smbd: add a rate limited cleanup of brl, connections and locking db

On unclean shutdown we can end up with stale entries in the brlock,
connections and locking db. Previously we would do the cleanup on
every unclean exit, but that can cause smbd to be completely
unavailable for several minutes when a large number of child smbd
processes exit.

This adds a rate limited cleanup of the databases, with the default
that cleanup happens at most every 20s
(cherry picked from commit dd498d2eecf124a03b6117ddab892a1112f9e9db)

The last 4 patches address bug #7312 (Many disconnecting clients renders
clustered samba unusuable for some time).
(cherry picked from commit 675c4b5522394e4431a88d9ab7647ca24765feb6)
source3/smbd/server.c