It has run all these years without the mutex, so I think reporting usually complete data as it always has would be a better default than not reporting at all. I'm not sure if there is a guarantee that the mutex has been initialized before we get a TCP connection so I put the conditional around it to use it only after it is ready.
If we remove the conditional the lock should silently fail and so we would get the same result. This would make the code a bit simpler and I'm OK with that. I suppose ideally you would check whether the lock failed and log those. But it looks like the only way it can fail is if it hasn't been initialized. And we know that it does get initialized so it's probably OK to just make the [un]lock calls with no conditionals or error checking, like the rest of the code does. -twitham -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brad Nicholes Sent: Thursday, March 27, 2008 9:42 AM To: Martin Knoblauch; [email protected] Subject: Re: [Ganglia-developers] Commit bugfix for bz #76 into 3.0.X >>> On 3/27/2008 at 2:44 AM, in message <[EMAIL PROTECTED]>, Martin Knoblauch <[EMAIL PROTECTED]> wrote: > Hi folks, > > any objections to commit the attached patch for a longstanding gmetad > problem into 3.0.X? I already put it into trunk a few days ago. The fix was > developed by Timothy on top of 3.0.6 and is in production use. Please vote. > Probably a minor point but the if statement checking that the mutex is valid made me wonder if no mutex is normal operation. In other words, if there isn't a valid mutex, is gmetad still in a healthy state and should continue to run? Or should this code always expect that there is a valid mutex and if there isn't, segfaulting, an error message or something else would be appropriate since that would be an indication that there is something else wrong with gmetad? Whatever the answer is doesn't really affect my vote, just wondering. +1 Brad ------------------------------------------------------------------------ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp lace _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
