Skip to content

Commit

Permalink
statistic: improve ipv6 for analyze job meta (#45177) (#45188)
Browse files Browse the repository at this point in the history
ref #43260
  • Loading branch information
ti-chi-bot authored Nov 6, 2023
1 parent 4d5d89b commit 8b2e9f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion executor/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"math"
"math/rand"
"net"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -2489,7 +2490,7 @@ func AddNewAnalyzeJob(ctx sessionctx.Context, job *statistics.AnalyzeJob) {
logutil.BgLogger().Error("failed to get server info", zap.Error(err))
instance = "unknown"
} else {
instance = fmt.Sprintf("%s:%d", serverInfo.IP, serverInfo.Port)
instance = net.JoinHostPort(serverInfo.IP, strconv.Itoa(int(serverInfo.Port)))
}
statsHandle := domain.GetDomain(ctx).StatsHandle()
err = statsHandle.InsertAnalyzeJob(job, instance, ctx.GetSessionVars().ConnectionID)
Expand Down

0 comments on commit 8b2e9f9

Please sign in to comment.