Skip to content

Commit 0dc1bcd

Browse files
authored
client/picker: log loop to V(2) (#8863)
The log for looping when the picked transport is not ready is unnecessarily expensive (this show up in our profiles on some edge cases). Condition it to V(2). RELEASE NOTES: N/A
1 parent 69b542a commit 0dc1bcd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

picker_wrapper.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
192192
// DoneInfo with default value works.
193193
pickResult.Done(balancer.DoneInfo{})
194194
}
195-
logger.Infof("blockingPicker: the picked transport is not ready, loop back to repick")
195+
if logger.V(2) {
196+
logger.Infof("blockingPicker: the picked transport is not ready, loop back to repick")
197+
}
196198
// If ok == false, ac.state is not READY.
197199
// A valid picker always returns READY subConn. This means the state of ac
198200
// just changed, and picker will be updated shortly.

0 commit comments

Comments
 (0)