Committed to trunk r1980, proposed for backport to 3.1 branch >>> On 3/1/2009 at 10:12 PM, in message <22391204.447591235970761341.javamail.corem...@bj126app61.126.com>, Jerry <ada...@126.com> wrote: > Hi Brad, > > As you said, when the number of bytes actually sent does not match the > expected bytes to send, apr_socket_send() automatically does some setting to > force select/poll on the next write call to handle the incomplete write > first. However, for a TCP request, gmond only poll once, then writes all data > to the socket and close the socket before next poll. So I think we need to > resend the miss part immediately for tcp receive channel. I tested my patch > and it works well for my issue. > > Thanks, > > Jerry > > > > > 2009-02-25?23:36:34,"Brad?Nicholes"?<bnicho...@novell.com> : >>???apr_socket_send()?returns?the?number?of?bytes?sent?in?the?3rd >>parameter.??If?the?number?of?bytes?actually?sent?does?not?match?the >>expected?bytes?to?send,?apr_socket_send()?automatically?sets?the >>apr_sockopt?to?APR_INCOMPLETE_WRITE.??What?that?does?is?force >>select/poll?on?the?next?write?call?to?try?to?handle?the?incomplete?write >>before?actually?writing?any?more?data?to?the?socket.??If?there?is?an >>error?of?some?sort,?the?return?value?from?apr_socket_send()?will >>indicate?a?problem.??However,?I?(or?anybody?else)?should?probably?review >>the?code?in?gmond.c?to?make?sure?that?an?incomplete?write?doesn't >>actually?cause?further?problems?and?that?the?return?value?from >>apr_socket_send()?is?actually?being?handled?correctly. >> >>Brad >> >> >>>>>?On?2/24/2009?at?6:57?PM,?in?message >><32623315.74691235527032322.javamail.corem...@bj126app51.126.com>, >>Jerry >><ada...@126.com>?wrote: >>>?Hi, >>>? >>>?Recently,?in?one?of?my?environments,?I?found?"telnet?xxxx?8649" >>didn't? >>>?return?a?well-formed?xml?document.?After?some?checking,?I?found?gmond >>might? >>>?lose?to?send?out?some?characters.?For?example,?I?got?some?xml >>document?like? >>>?"<METRIC?NAME="part_max_used"?VAL="13.8"?TYPE="float"?UNITS="%" >>TN="55"? >>>?TMAX="180"?<EXTRA_DATA>". >>>? >>>?After?read?the?code,?I?think?usage?of?"apr_socket_send"?in?"gmond.c" >>has? >>>?defect.?We?just?check?return?value?of?"apr_socket_send"?but?do?NOT >>check?how? >>>?many?characters?have?been?sent.?I?gave?a?patch?in?attachment.?FYI >>>? >>>?Thanks, >>>? >>>?Jerry >>>? >>>?
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers