No, this is a bug. Ganglia_collection_group_send() should be using the passed in 'now' parameter rather than redefining its own. By using the passed in 'now' parameter, both collection and sending will be using the same time interval which is defined during the main() iteration loop. As it is currently, some metadata packets with the same expiration time might be sent during an iteration and other not, depending on whether the value of 'now' changed during the iteration itself. I will go ahead and fix this and also pick up the other minor fix in this patch.
Brad >>> On Thu, Jan 24, 2008 at 11:40 AM, in message <[EMAIL PROTECTED]>, Matthias Blankenhaus <[EMAIL PROTECTED]> wrote: > > On Thu, 24 Jan 2008, Brad Nicholes wrote: >> I like your plan. It is easier to review smaller patches that deal with > specific parts of the overall feature, than it is to try to wrap your head > around one big patch. I would suggest that you go with the smaller patches. >> >> Brad >> > Excellent. Here comes the first patch doing some minor cleanup work on > gmond.c If anyone has something to add to this patch in terms of cleanup > work I gladly include that. > > For the patch I have some design questions: I have noticed that > Ganglia_collection_group_send() takes the curent time (->'now') as > a param, but then defines a local var with the same name and recollects > the time via apr_time_now(). However, Ganglia_collection_group_collect() > sticks with the passed in 'now' parameter. Is this a bug or a feature ? > Should Ganglia_collection_group_send() not recollect the time and stick > with the passed in time ? > > The patch below resolved the time ambiguity for > Ganglia_collection_group_send() in one way > that seems to work. > > Any opnions on this ? > > Thanx, > Matthias > > > svn diff gmond.c > Index: gmond.c > =================================================================== > --- gmond.c (revision 929) > +++ gmond.c (working copy) > @@ -1769,6 +1769,7 @@ > if (strcasecmp(name, mi[k].name) == 0) > { > memcpy (metric_info, &(mi[k]), > sizeof(Ganglia_25metric)); > + break; > } > } > > @@ -1948,7 +1949,7 @@ > } > > void > -Ganglia_collection_group_send( Ganglia_collection_group *group, apr_time_t > now) > +Ganglia_collection_group_send( Ganglia_collection_group *group) > { > int i; > > @@ -2104,7 +2105,7 @@ > Ganglia_collection_group *group = ((Ganglia_collection_group > **)(collection_groups->elts))[i]; > if( group->next_send <= now ) > { > - Ganglia_collection_group_send(group, now); > + Ganglia_collection_group_send(group); > } > } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers