diff --git a/br/pkg/storage/BUILD.bazel b/br/pkg/storage/BUILD.bazel index 8c98a13e59500..50700e609e7ed 100644 --- a/br/pkg/storage/BUILD.bazel +++ b/br/pkg/storage/BUILD.bazel @@ -38,8 +38,9 @@ go_library( "@com_github_azure_azure_sdk_for_go_sdk_azcore//policy", "@com_github_azure_azure_sdk_for_go_sdk_azidentity//:azidentity", "@com_github_azure_azure_sdk_for_go_sdk_storage_azblob//:azblob", - "@com_github_golang_snappy//:snappy", "@com_github_google_uuid//:uuid", + "@com_github_klauspost_compress//gzip", + "@com_github_klauspost_compress//snappy", "@com_github_klauspost_compress//zstd", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_kvproto//pkg/brpb", diff --git a/br/pkg/storage/writer.go b/br/pkg/storage/writer.go index f61d30fa530d9..003f91451fd03 100644 --- a/br/pkg/storage/writer.go +++ b/br/pkg/storage/writer.go @@ -2,11 +2,11 @@ package storage import ( "bytes" - "compress/gzip" "context" "io" - "github.com/golang/snappy" + "github.com/klauspost/compress/gzip" + "github.com/klauspost/compress/snappy" "github.com/klauspost/compress/zstd" "github.com/pingcap/errors" "github.com/pingcap/log" diff --git a/table/column.go b/table/column.go index 30fe02d8ec85d..649b366d98de8 100644 --- a/table/column.go +++ b/table/column.go @@ -300,6 +300,10 @@ func CastValue(ctx sessionctx.Context, val types.Datum, col *model.ColumnInfo, r if returnErr && err != nil { return casted, err } + if err != nil { + logutil.BgLogger().Debug("[debug] ConvertTo FieldType failed", zap.Stringer("FieldType", &col.FieldType), + zap.Stringer("Datum", val), zap.Error(err)) + } if err != nil && types.ErrTruncated.Equal(err) && col.GetType() != mysql.TypeSet && col.GetType() != mysql.TypeEnum { str, err1 := val.ToString() if err1 != nil {