ctdb-common: Do not queue a packet if queue does not have valid fd
authorAmitay Isaacs <amitay@gmail.com>
Fri, 29 Sep 2017 04:23:24 +0000 (14:23 +1000)
committerMartin Schwenke <martins@samba.org>
Thu, 5 Oct 2017 03:19:21 +0000 (05:19 +0200)
commitddd97553f0a8bfaada178ec4a7460d76fa21f079
treed0f66042af0d6868177bc5604116d32df555119f
parentbf11bea5dbb589186a205fa1d81368cc89a6139b
ctdb-common: Do not queue a packet if queue does not have valid fd

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13056

The only time a ctdb_queue is created without valid fd is when CTDB
is trying to establish connections with other nodes in the cluster.
All the other uses always create a ctdb_queue with valid fd.

This avoids queueing up packets for dead nodes or nodes that are not
running in the cluster and stops consuming memory.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/ctdb_io.c