Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
d1a2d1b8
Commit
d1a2d1b8
authored
Aug 20, 2019
by
liuzhiweihome
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix _avg_latency maybe zero
parent
c90c58b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
locality_aware_load_balancer.cpp
src/brpc/policy/locality_aware_load_balancer.cpp
+3
-0
No files found.
src/brpc/policy/locality_aware_load_balancer.cpp
View file @
d1a2d1b8
...
...
@@ -457,6 +457,9 @@ int64_t LocalityAwareLoadBalancer::Weight::Update(
// or time skews, we don't update the weight for safety.
return
0
;
}
if
(
_avg_latency
==
0
)
{
return
0
;
}
_base_weight
=
scaled_qps
/
_avg_latency
;
return
ResetWeight
(
index
,
end_time_us
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment