We only queued up to 1000 packets per queue before we start dropping
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 3 Feb 2010 22:54:06 +0000 (09:54 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 3 Feb 2010 22:54:06 +0000 (09:54 +1100)
commit59ba5d7f80e0465e5076533374fb9ee862ed7bb6
tree250bfb857b50b920cbd76da4024730af0be96e11
parent8c89aac20260dc7f3746e29fe99f17422a77cb88
We only queued up to 1000 packets per queue before we start dropping
packets, to avoid the queue to grow excessively if smbd has blocked.

This could cause traverse packets to become discarded in case the main
smbd daemon does a traverse of a database while there is a recovery
(sending a erconfigured message to smbd, causing an avalanche of unlock
messages to be sent across the cluster.)

This avalance of messages could cause also the tranversal message to be
discarded  causing the main smbd process to hang indefinitely waiting
for the traversal message that will never arrive.

Bump the maximum queue length before starting to discard messages from
1000 to 1000000 and at the same time rework the queueing slightly so we
can append messages cheaply to the queue instead of walking the list
from head to tail every time.
common/ctdb_io.c
server/ctdb_tunables.c