vastian180 opened a new pull request, #3240:
URL: https://github.com/apache/celeborn/pull/3240
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX]
Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a
faster review.
-->
### What changes were proposed in this pull request?
In the `updateProduceBytes` method, `userBufferInfo.bufferStatusHub` and
`workerBufferStatusHub` add the same node. This results in the lastNode's
numBytes being repeatedly accumulated in the `_deque` of both hubs if
updateProduceBytes is called multiple times within one second, since the
`lastNode` is the same object.
This will cause the numBytes of `nodeToSeparate` to become negative when the
`removeExpiredNodes` method is called, specifically at the line
`nodeToSeparate.separateNode(removed.getRight());` , which will make
avgBytesPerSec return 0.
As shown in the figure below, this value remains at 0 for a long period of
time in the Dashborad.

### Why are the changes needed?
Fix updateProduceBytes method.
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
UT
AND Dashborad:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]