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
6b014ac6
Commit
6b014ac6
authored
Oct 26, 2018
by
TousakaRin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix: In short/pooled mode, the data feedback for circuit_breaker will be wrong.
parent
d8893d43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
controller.cpp
src/brpc/controller.cpp
+2
-1
socket.cpp
src/brpc/socket.cpp
+1
-1
No files found.
src/brpc/controller.cpp
View file @
6b014ac6
...
...
@@ -761,6 +761,7 @@ void Controller::Call::OnComplete(
}
break
;
}
if
(
ELOGOFF
==
error_code
)
{
SocketUniquePtr
sock
;
if
(
Socket
::
Address
(
peer_id
,
&
sock
)
==
0
)
{
...
...
@@ -768,7 +769,7 @@ void Controller::Call::OnComplete(
sock
->
SetLogOff
();
}
}
if
(
need_feedback
)
{
const
LoadBalancer
::
CallInfo
info
=
{
begin_time_us
,
peer_id
,
error_code
,
c
};
...
...
src/brpc/socket.cpp
View file @
6b014ac6
...
...
@@ -834,7 +834,6 @@ int Socket::SetFailed(int error_code, const char* error_fmt, ...) {
vref
,
MakeVRef
(
id_ver
+
1
,
NRefOfVRef
(
vref
)),
butil
::
memory_order_release
,
butil
::
memory_order_relaxed
))
{
GetOrNewSharedPart
()
->
circuit_breaker
.
MarkAsBroken
();
// Update _error_text
std
::
string
error_text
;
if
(
error_fmt
!=
NULL
)
{
...
...
@@ -852,6 +851,7 @@ int Socket::SetFailed(int error_code, const char* error_fmt, ...) {
// by Channel to revive never-connected socket when server side
// comes online.
if
(
_health_check_interval_s
>
0
)
{
GetOrNewSharedPart
(
)
->
circuit_breaker
.
MarkAsBroken
();
PeriodicTaskManager
::
StartTaskAt
(
new
HealthCheckTask
(
id
()),
butil
::
milliseconds_from_now
(
GetOrNewSharedPart
()
->
...
...
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