Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ require (
github.com/pingcap/tidb v1.1.0-beta.0.20261113093556-507927a8e87b
github.com/pingcap/tidb-dashboard v0.0.0-20260603054940-9e92195886c3
github.com/pingcap/tidb/pkg/parser v0.0.0-20261113093556-507927a8e87b
github.com/pingcap/tiflow v0.0.0-20261119055844-e34a98a08abc
github.com/pingcap/tiflow v0.0.0-20261125085924-56d6f29c9aa5
github.com/prometheus/client_golang v1.23.2
github.com/prometheus/client_model v0.6.2
github.com/r3labs/diff v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,8 @@ github.com/pingcap/tidb-dashboard v0.0.0-20260603054940-9e92195886c3 h1:q7K62HEN
github.com/pingcap/tidb-dashboard v0.0.0-20260603054940-9e92195886c3/go.mod h1:dZXZ7smJd5ZkwDMHnPfrhnzUFNbL5kMU5MpFxRfKr0U=
github.com/pingcap/tidb/pkg/parser v0.0.0-20261113093556-507927a8e87b h1:dEZw3hs54rsrhCFE1LVso0mdtwhBCCOSrwA/XGUaXNI=
github.com/pingcap/tidb/pkg/parser v0.0.0-20261113093556-507927a8e87b/go.mod h1:uEcaw1qNm1YJ0aICD/M7Td48krrkHNVlfNoFC+X9ntI=
github.com/pingcap/tiflow v0.0.0-20261119055844-e34a98a08abc h1:hC6qg9CdZG7+tKUa9WMqSWee1ZVs9yBKDinb2YUAAhw=
github.com/pingcap/tiflow v0.0.0-20261119055844-e34a98a08abc/go.mod h1:laCh980L4iZ+Uta6l2PEoyWRGjRZKV9sqiszmcDl98g=
github.com/pingcap/tiflow v0.0.0-20261125085924-56d6f29c9aa5 h1:01GKCLtMT4UcptHpoxAm2KtAPTwPeMtW4wjG/WgxsHY=
github.com/pingcap/tiflow v0.0.0-20261125085924-56d6f29c9aa5/go.mod h1:vhNSYPgU3iFTO2dnsV1DBAmLkJzZqMfRrwEPyUbMamo=
github.com/pingcap/tipb v0.0.0-20260605083900-f9f651ef5fbc h1:wxolKysltFSu8gxWJBdUdWuTBoSuY3MjNIIZI5S9JLY=
github.com/pingcap/tipb v0.0.0-20260605083900-f9f651ef5fbc/go.mod h1:A7mrd7WHBl1o63LE2bIBGEJMTNWXqhgmYiOvMLxozfs=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
Expand Down
24 changes: 9 additions & 15 deletions pkg/logger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"bytes"
"context"
"io"
stdlog "log"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -205,20 +204,18 @@ func InitLogger(cfg *Config, opts ...LoggerOpt) error {

// initOptionalComponent initializes some optional components
func initOptionalComponent(op *loggerOp, cfg *Config) error {
var level zapcore.Level
err := level.UnmarshalText([]byte(cfg.Level))
if err != nil {
return errors.Trace(err)
}

if op.isInitGRPCLogger {
var level zapcore.Level
if err := level.UnmarshalText([]byte(cfg.Level)); err != nil {
return errors.Trace(err)
}
if err := initGRPCLogger(level); err != nil {
return err
}
}

if op.isInitSaramaLogger {
if err := initSaramaLogger(level); err != nil {
if err := initSaramaLogger(); err != nil {
return err
}
}
Expand Down Expand Up @@ -255,13 +252,10 @@ func initMySQLLogger() error {
}

// initSaramaLogger hacks logger used in sarama lib
func initSaramaLogger(level zapcore.Level) error {
if zapcore.InfoLevel.Enabled(level) {
sarama.Logger = stdlog.New(io.Discard, "[Sarama] ", stdlog.LstdFlags)
return nil
}

logger, err := zap.NewStdLogAt(log.L().With(zap.String("component", "sarama")), level)
func initSaramaLogger() error {
// sarama has no log level, so all its messages are written at debug level
// and the log level decides whether they show up.
logger, err := zap.NewStdLogAt(log.L().With(zap.String("component", "sarama")), zapcore.DebugLevel)
if err != nil {
return errors.Trace(err)
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/sink/codec/canal/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func mysqlType2JavaType(t byte, isBinary bool) common.JavaSQLType {
return common.JavaSQLTypeVARCHAR
case mysql.TypeTiDBVectorFloat32:
return common.JavaSQLTypeVARCHAR
case mysql.TypeNull:
return common.JavaSQLTypeNULL
case mysql.TypeGeometry:
return common.JavaSQLTypeBINARY
default:
}
return common.JavaSQLTypeVARCHAR
Expand Down
Loading