[PATCH] CTDB logging improvement for locking

Amitay Isaacs amitay at gmail.com
Fri Jun 16 06:30:33 UTC 2017


CTDB creates a lock helper to lock a record or a database.  If the
lock helper is unable to take a lock for 10 seconds, ctdb will log a
message and optionally launch a debug helper.

If there is record contention, then there can be hundreds of lock
helpers waiting. When these lock helpers do not get lock for 10
seconds (and increments of 10 seconds), all of them will log "unable
to get RECORD lock for xx seconds".  Multiple such messages are quite
useless and overwhelm syslogd when logging to syslog.

To avoid message storm, keep track of the messages which are logged
and log once every 10 seconds per record.  Also, launch debug helper
only once per 10 seconds.  This can avoid launching too many processes
on a busy system.

Please review and push.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctdb-locking.patch
Type: text/x-patch
Size: 10348 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170616/e7a778ca/ctdb-locking-0001.bin>

More information about the samba-technical mailing list