Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
9f41c048
Commit
9f41c048
authored
7 years ago
by
Alexander Polcyn
Browse files
Options
Downloads
Patches
Plain Diff
%z -> %lu for mingw build
parent
bce8712f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
+15
-13
15 additions, 13 deletions
...ilters/client_channel/lb_policy/round_robin/round_robin.c
with
15 additions
and
13 deletions
src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
+
15
−
13
View file @
9f41c048
...
...
@@ -165,20 +165,21 @@ static size_t get_next_ready_subchannel_index_locked(
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_INFO
,
"[RR: %p] getting next ready subchannel, "
"last_ready_subchannel_index=%
z
u"
,
p
,
p
->
last_ready_subchannel_index
);
"last_ready_subchannel_index=%
l
u"
,
p
,
(
unsigned
long
)
p
->
last_ready_subchannel_index
);
}
for
(
size_t
i
=
0
;
i
<
p
->
num_subchannels
;
++
i
)
{
const
size_t
index
=
(
i
+
p
->
last_ready_subchannel_index
+
1
)
%
p
->
num_subchannels
;
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_DEBUG
,
"[RR %p] checking index %zu: state=%d"
,
p
,
index
,
gpr_log
(
GPR_DEBUG
,
"[RR %p] checking index %lu: state=%d"
,
p
,
(
unsigned
long
)
index
,
p
->
subchannels
[
index
].
curr_connectivity_state
);
}
if
(
p
->
subchannels
[
index
].
curr_connectivity_state
==
GRPC_CHANNEL_READY
)
{
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_DEBUG
,
"[RR %p] found next ready subchannel at index %
z
u"
,
p
,
index
);
gpr_log
(
GPR_DEBUG
,
"[RR %p] found next ready subchannel at index %
l
u"
,
p
,
(
unsigned
long
)
index
);
}
return
index
;
}
...
...
@@ -196,8 +197,8 @@ static void update_last_ready_subchannel_index_locked(round_robin_lb_policy *p,
p
->
last_ready_subchannel_index
=
last_ready_index
;
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_DEBUG
,
"[RR: %p] setting last_ready_subchannel_index=%
z
u (SC %p, CSC %p)"
,
(
void
*
)
p
,
last_ready_index
,
"[RR: %p] setting last_ready_subchannel_index=%
l
u (SC %p, CSC %p)"
,
(
void
*
)
p
,
(
unsigned
long
)
last_ready_index
,
(
void
*
)
p
->
subchannels
[
last_ready_index
].
subchannel
,
(
void
*
)
grpc_subchannel_get_connected_subchannel
(
p
->
subchannels
[
last_ready_index
].
subchannel
));
...
...
@@ -342,8 +343,8 @@ static int rr_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
}
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_DEBUG
,
"[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (INDEX %
z
u)"
,
(
void
*
)
*
target
,
next_ready_index
);
"[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (INDEX %
l
u)"
,
(
void
*
)
*
target
,
(
unsigned
long
)
next_ready_index
);
}
/* only advance the last picked pointer if the selection was used */
update_last_ready_subchannel_index_locked
(
p
,
next_ready_index
);
...
...
@@ -510,8 +511,9 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg,
}
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
gpr_log
(
GPR_DEBUG
,
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (INDEX %zu)"
,
(
void
*
)
selected
->
subchannel
,
next_ready_index
);
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (INDEX %lu)"
,
(
void
*
)
selected
->
subchannel
,
(
unsigned
long
)
next_ready_index
);
}
grpc_closure_sched
(
exec_ctx
,
pp
->
on_complete
,
GRPC_ERROR_NONE
);
gpr_free
(
pp
);
...
...
@@ -616,8 +618,8 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
if
(
GRPC_TRACER_ON
(
grpc_lb_round_robin_trace
))
{
char
*
address_uri
=
grpc_sockaddr_to_uri
(
&
addresses
->
addresses
[
i
].
address
);
gpr_log
(
GPR_DEBUG
,
"index %
z
u: Created subchannel %p for address uri %s"
,
subchannel_index
,
(
void
*
)
subchannel
,
address_uri
);
gpr_log
(
GPR_DEBUG
,
"index %
l
u: Created subchannel %p for address uri %s"
,
(
unsigned
long
)
subchannel_index
,
(
void
*
)
subchannel
,
address_uri
);
gpr_free
(
address_uri
);
}
grpc_channel_args_destroy
(
exec_ctx
,
new_args
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment