[PATCH] CTDB log message improvements

Michael Adam obnox at samba.org
Tue Jul 5 10:59:58 UTC 2016


On 2016-07-05 at 14:57 +1000, Martin Schwenke wrote:
> On Tue, 5 Jul 2016 14:24:21 +1000, Amitay Isaacs <amitay at gmail.com>
> wrote:
> 
> > On Tue, Jul 5, 2016 at 2:14 PM, Richard Sharpe <realrichardsharpe at gmail.com>
> > wrote:
> > 
> > > On Mon, Jul 4, 2016 at 12:00 AM, Amitay Isaacs <amitay at gmail.com> wrote:  
> > > > Hi,
> > > >
> > > > Here are two changes to log messages.
> > > >
> > > > Please review and push.
> > > >
> > > > Amitay.  
> > >
> > > I am confused by the wording in this hunk:
> > >
> > > @@ -1606,12 +1606,14 @@ int32_t ctdb_control_set_recmaster(struct
> > > ctdb_context *
> > > ctdb, uint32_t opcode, T
> > >
> > >   if (ctdb->pnn != new_recmaster && ctdb->recovery_master == ctdb->pnn) {
> > >   DEBUG(DEBUG_NOTICE,
> > > -      ("This node (%u) is no longer the recovery master\n", ctdb  
> > > ->pnn));  
> > > +      ("Local node %u is now the recovery master\n",
> > > +       new_recmaster));
> > >   }
> > >
> > >   if (ctdb->pnn == new_recmaster && ctdb->recovery_master != new_recmaster
> > > ) {
> > >   DEBUG(DEBUG_NOTICE,
> > > -      ("This node (%u) is now the recovery master\n", ctdb->pnn)
> > > );
> > > +      ("Remote node %u is now the recovery master\n",
> > > +       ctdb->pnn));
> > >   }
> > >
> > >   ctdb->recovery_master = new_recmaster;
> > >
> > > What local node are you referring to? The one the log is printed on?
> > >
> > > Wouldn't it be better to say: "This node (%u) is now the recovery master"?
> > >  
> > 
> > Oops.  I switched the two log messages around.
> > 
> > "Local" and "Remote" were late additions just to distinguish between the
> > two cases.  The original message sounds much better.
> > 
> > Here are the updated patches.
> 
> Yeah, that's better...  :-)

Agreed, but we should try to avoid sneaking in
reformattings (line-breaks) in otherwise untouched
lines... :-)

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160705/5bdc0b6c/signature.sig>


More information about the samba-technical mailing list