Skip to content

Commit

Permalink
refactor: add trace
Browse files Browse the repository at this point in the history
  • Loading branch information
yangdm0209 committed Dec 3, 2024
1 parent c5bea22 commit 4ff748c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ func (m *mux) blockingMulti(ctx context.Context, cmd []Completed) (resp *redisre

func (m *mux) pipeline(ctx context.Context, cmd Completed) (resp RedisResult) {
slot := slotfn(len(m.wire), cmd.Slot(), cmd.NoReply())
var finishPick func(error)
ctx, finishPick = StartTrace(ctx, "cluster-client.cluster.pick")
wire := m.pipe(slot)
finishPick(nil)
if resp = wire.Do(ctx, cmd); isBroken(resp.NonRedisError(), wire) {
m.wire[slot].CompareAndSwap(wire, m.init)
}
Expand Down

0 comments on commit 4ff748c

Please sign in to comment.