Skip to content

Commit

Permalink
fix(auto_balancer): fix mistakenly reused reference (#2104)
Browse files Browse the repository at this point in the history
Signed-off-by: Shichao Nie <niesc@automq.com>
  • Loading branch information
SCNieh authored Oct 30, 2024
1 parent 8987499 commit 33e0be0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void setMetricsOutOfDate(boolean metricsOutOfDate) {
public void addLoad(byte resource, Load load) {
this.loads.compute(resource, (k, v) -> {
if (v == null) {
return load;
return new Load(load);
}
v.add(load);
return v;
Expand All @@ -156,7 +156,7 @@ public void addLoad(byte resource, Load load) {
public void reduceLoad(byte resource, Load load) {
this.loads.compute(resource, (k, v) -> {
if (v == null) {
return load;
return new Load(load);
}
v.reduceValue(load);
return v;
Expand Down

0 comments on commit 33e0be0

Please sign in to comment.