Log request info for label warning (#744)

Signed-off-by: Daniël van Eeden <git@myname.nl>
Co-authored-by: disksing <i@disksing.com>
This commit is contained in:
Daniël van Eeden 2023-03-27 08:51:16 +02:00 committed by GitHub
parent f23d942527
commit f7e35b25be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -583,7 +583,8 @@ func (state *accessFollower) next(bo *retry.Backoffer, selector *replicaSelector
// If there is no candidate, fallback to the leader.
if selector.targetIdx < 0 {
if len(state.option.labels) > 0 {
logutil.BgLogger().Warn("unable to find stores with given labels")
logutil.BgLogger().Warn("unable to find stores with given labels",
zap.Any("labels", state.option.labels))
}
leader := selector.replicas[state.leaderIdx]
if leader.isEpochStale() || leader.isExhausted(1) {