CTDB: Small patch set fixing memory leak and other things for ctdb_daemon_read_cb

Martin Schwenke martin at meltin.net
Fri Mar 16 09:46:02 UTC 2018

On Tue, 13 Mar 2018 10:06:56 +0100, Swen Schillig via samba-technical
<samba-technical at lists.samba.org> wrote:

> The attached file contains 3 small patches fixing a memory leak,
> removes not require checks and is cleaning up the code for column
> length, function call formatting and using the right logging macros.

For the 1st commit, the commit message says:

  Within ctdb_daemon_read_cb the provided data is checked for sanity,
  e.g. correct size and content. This is not required because it was
  done already by the caller.

You might as well name the caller.

I assume you mean queue_process() in ctdb/common/ctdb_io.c.  However, I
don't see where that function confirms that it has read a full

In the 2nd commit, since the debug message is very generic and is meant
for debugging, please use DBG_DEBUG(), since this logs the function
name, instead of D_DEBUG().

We introduced the D_*() macros for CTDB because we do a lot of logging
of cluster/node state changes.  These messages are usually unique and
are often meant to be read by an admin or support person, so don't need
the clutter of the function name.  For the deeper debugging messages we
need a little more context.

I think the 3rd commit looks good.

peace & happiness,

More information about the samba-technical mailing list