You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "boneanxs (via GitHub)" <gi...@apache.org> on 2023/02/27 06:40:15 UTC
[GitHub] [incubator-celeborn] boneanxs opened a new pull request, #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
boneanxs opened a new pull request, #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279
<!--
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?
Change the avg calculation in Congestion control to use `currentTimeWindow` instead of `maxTimeTimeWindow`(sampleTimeWindowSeconds)
### Why are the changes needed?
If a user just connect to a worker, we'll directly calculate the avg bytes by all bytes produced / sampleTimeWindowSeconds, but this is not right, we should use the current time window instead of the max time window
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
Existing tests.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279#discussion_r1118417337
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/congestcontrol/BufferStatusHub.java:
##########
@@ -71,4 +71,12 @@ public BufferStatusHub(int timeWindowsInSecs) {
protected BufferStatusNode newEmptyNode() {
return new BufferStatusNode();
}
+
+ public long avgBytesPerSec() {
+ long currentNumBytes = sum().numBytes();
+ if (currentNumBytes > 0) {
+ return currentNumBytes * 1000 / (long) getCurrentTimeWindowsInMills();
+ }
+ return 0L;
Review Comment:
> if `currentNumBytes` is 0, means there is no bytes being added, and `getCurrentTimeWindowsInMills` could be zero, causing the arithmetic exception
Got it, thanks
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279#issuecomment-1445810206
# [Codecov](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1279](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (86d9894) into [main](https://codecov.io/gh/apache/incubator-celeborn/commit/935806f03618cdfe79314c83733809e9b7b5e834?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (935806f) will **decrease** coverage by `0.00%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## main #1279 +/- ##
============================================
- Coverage 27.01% 27.01% -0.00%
- Complexity 813 814 +1
============================================
Files 215 215
Lines 18426 18428 +2
Branches 1982 1983 +1
============================================
Hits 4976 4976
- Misses 13125 13127 +2
Partials 325 325
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../deploy/worker/congestcontrol/BufferStatusHub.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d29ya2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9zZXJ2aWNlL2RlcGxveS93b3JrZXIvY29uZ2VzdGNvbnRyb2wvQnVmZmVyU3RhdHVzSHViLmphdmE=) | `82.61% <100.00%> (+3.67%)` | :arrow_up: |
| [...oy/worker/congestcontrol/CongestionController.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d29ya2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9zZXJ2aWNlL2RlcGxveS93b3JrZXIvY29uZ2VzdGNvbnRyb2wvQ29uZ2VzdGlvbkNvbnRyb2xsZXIuamF2YQ==) | `76.20% <100.00%> (-0.66%)` | :arrow_down: |
| [...e/deploy/worker/congestcontrol/TimeSlidingHub.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-d29ya2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9zZXJ2aWNlL2RlcGxveS93b3JrZXIvY29uZ2VzdGNvbnRyb2wvVGltZVNsaWRpbmdIdWIuamF2YQ==) | `72.23% <100.00%> (+0.53%)` | :arrow_up: |
| [...ice/deploy/master/clustermeta/ha/HARaftServer.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWFzdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9zZXJ2aWNlL2RlcGxveS9tYXN0ZXIvY2x1c3Rlcm1ldGEvaGEvSEFSYWZ0U2VydmVyLmphdmE=) | `76.58% <0.00%> (-1.35%)` | :arrow_down: |
| [...cala/org/apache/celeborn/common/CelebornConf.scala](https://codecov.io/gh/apache/incubator-celeborn/pull/1279?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY2VsZWJvcm4vY29tbW9uL0NlbGVib3JuQ29uZi5zY2FsYQ==) | `81.19% <0.00%> (+0.06%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu merged pull request #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu merged PR #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] boneanxs commented on a diff in pull request #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
Posted by "boneanxs (via GitHub)" <gi...@apache.org>.
boneanxs commented on code in PR #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279#discussion_r1118404081
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/congestcontrol/BufferStatusHub.java:
##########
@@ -71,4 +71,12 @@ public BufferStatusHub(int timeWindowsInSecs) {
protected BufferStatusNode newEmptyNode() {
return new BufferStatusNode();
}
+
+ public long avgBytesPerSec() {
+ long currentNumBytes = sum().numBytes();
+ if (currentNumBytes > 0) {
+ return currentNumBytes * 1000 / (long) getCurrentTimeWindowsInMills();
+ }
+ return 0L;
Review Comment:
if `currentNumBytes` is 0, means there is no bytes being added, and `getCurrentTimeWindowsInMills` could be zero, causing the arithmetic exception
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1279: [CELEBORN-342] Fix the wrong avg produce bytes in Congestion control
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1279:
URL: https://github.com/apache/incubator-celeborn/pull/1279#discussion_r1118399540
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/congestcontrol/BufferStatusHub.java:
##########
@@ -71,4 +71,12 @@ public BufferStatusHub(int timeWindowsInSecs) {
protected BufferStatusNode newEmptyNode() {
return new BufferStatusNode();
}
+
+ public long avgBytesPerSec() {
+ long currentNumBytes = sum().numBytes();
+ if (currentNumBytes > 0) {
+ return currentNumBytes * 1000 / (long) getCurrentTimeWindowsInMills();
+ }
+ return 0L;
Review Comment:
The if command seems not necessary?
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org