Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pingcap/tidb into ddl-tas…
Browse files Browse the repository at this point in the history
…k-type
  • Loading branch information
glorv committed Aug 9, 2023
2 parents 7fb0f47 + a0cbff2 commit 5540c1b
Show file tree
Hide file tree
Showing 192 changed files with 6,353 additions and 3,888 deletions.
72 changes: 36 additions & 36 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5780,13 +5780,13 @@ def go_deps():
name = "com_github_pingcap_tipb",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/tipb",
sha256 = "bb5d3cf24245a26acb1c8f8c110eb3313f21a655a8b49280f2772082bb29dc22",
strip_prefix = "github.com/pingcap/tipb@v0.0.0-20230607071926-bda24015c2d6",
sha256 = "74b710db49c16c0400c44d14e7d2e23257d094d7cf39c71e5715bb5ac59fd57a",
strip_prefix = "github.com/pingcap/tipb@v0.0.0-20230802082933-256c189cd860",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230607071926-bda24015c2d6.zip",
"http://ats.apps.svc/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230607071926-bda24015c2d6.zip",
"https://cache.hawkingrei.com/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230607071926-bda24015c2d6.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230607071926-bda24015c2d6.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230802082933-256c189cd860.zip",
"http://ats.apps.svc/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230802082933-256c189cd860.zip",
"https://cache.hawkingrei.com/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230802082933-256c189cd860.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/pingcap/tipb/com_github_pingcap_tipb-v0.0.0-20230802082933-256c189cd860.zip",
],
)
go_repository(
Expand Down Expand Up @@ -6131,13 +6131,13 @@ def go_deps():
name = "com_github_rogpeppe_go_internal",
build_file_proto_mode = "disable_global",
importpath = "github.com/rogpeppe/go-internal",
sha256 = "87774aa95156e10f1ae865004bd8f240bbe95f18160e62c12fdfa2ece57f7456",
strip_prefix = "github.com/rogpeppe/go-internal@v1.10.0",
sha256 = "3629d4b2e457fdba5e9d51a376e2bead9b28a20696fa905b701c79250188c4e3",
strip_prefix = "github.com/rogpeppe/go-internal@v1.11.0",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.10.0.zip",
"http://ats.apps.svc/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.10.0.zip",
"https://cache.hawkingrei.com/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.10.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.10.0.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.11.0.zip",
"http://ats.apps.svc/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.11.0.zip",
"https://cache.hawkingrei.com/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.11.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/rogpeppe/go-internal/com_github_rogpeppe_go_internal-v1.11.0.zip",
],
)
go_repository(
Expand Down Expand Up @@ -6937,13 +6937,13 @@ def go_deps():
name = "com_github_tikv_pd_client",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
sha256 = "401dddb69309b07fa9d4464adeaf5d98a456dda622114fd479d01d18ab622cbc",
strip_prefix = "github.com/tikv/pd/client@v0.0.0-20230724080549-de985b8e0afc",
sha256 = "840e8de75f3acfbfaebea975ec2d7f8db2aa1150c9ba1f4c37e9aa60d2f90480",
strip_prefix = "github.com/tikv/pd/client@v0.0.0-20230728033905-31343e006842",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230724080549-de985b8e0afc.zip",
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230724080549-de985b8e0afc.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230724080549-de985b8e0afc.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230724080549-de985b8e0afc.zip",
"http://bazel-cache.pingcap.net:8080/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230728033905-31343e006842.zip",
"http://ats.apps.svc/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230728033905-31343e006842.zip",
"https://cache.hawkingrei.com/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230728033905-31343e006842.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/github.com/tikv/pd/client/com_github_tikv_pd_client-v0.0.0-20230728033905-31343e006842.zip",
],
)
go_repository(
Expand Down Expand Up @@ -10113,13 +10113,13 @@ def go_deps():
name = "org_golang_x_net",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/net",
sha256 = "5d97db0b34367452949b1b04194b47a663cbb0852f40d119ba5d910ccc124657",
strip_prefix = "golang.org/x/net@v0.11.0",
sha256 = "18318db7af82100fca04ce260f7cd71b98a17559da652405682a46bd7278f0b6",
strip_prefix = "golang.org/x/net@v0.13.0",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.11.0.zip",
"http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.11.0.zip",
"https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.11.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.11.0.zip",
"http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.13.0.zip",
"http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.13.0.zip",
"https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.13.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.13.0.zip",
],
)
go_repository(
Expand Down Expand Up @@ -10178,13 +10178,13 @@ def go_deps():
name = "org_golang_x_text",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/text",
sha256 = "62f4c24ff16ae16ddabf290e16c89671eb24caeec81bfac88134c01d3cf757a8",
strip_prefix = "golang.org/x/text@v0.11.0",
sha256 = "437a787c7f92bcb8b2f2ab97fcd74ce88b5e7a5b21aa299e90f5c5dd28a7b66f",
strip_prefix = "golang.org/x/text@v0.12.0",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.11.0.zip",
"http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.11.0.zip",
"https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.11.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.11.0.zip",
"http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.12.0.zip",
"http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.12.0.zip",
"https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.12.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.12.0.zip",
],
)
go_repository(
Expand Down Expand Up @@ -10412,12 +10412,12 @@ def go_deps():
name = "org_uber_go_zap",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/zap",
sha256 = "2da00f57df49f248c7e84e0b069b8999ed2a528ffb426efaecd285e771cd218a",
strip_prefix = "go.uber.org/zap@v1.24.0",
sha256 = "0793f45a0c874bb560fafe7eb46c59038cd10fec58dbd4addfa0a4c35a21a80c",
strip_prefix = "go.uber.org/zap@v1.25.0",
urls = [
"http://bazel-cache.pingcap.net:8080/gomod/go.uber.org/zap/org_uber_go_zap-v1.24.0.zip",
"http://ats.apps.svc/gomod/go.uber.org/zap/org_uber_go_zap-v1.24.0.zip",
"https://cache.hawkingrei.com/gomod/go.uber.org/zap/org_uber_go_zap-v1.24.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/go.uber.org/zap/org_uber_go_zap-v1.24.0.zip",
"http://bazel-cache.pingcap.net:8080/gomod/go.uber.org/zap/org_uber_go_zap-v1.25.0.zip",
"http://ats.apps.svc/gomod/go.uber.org/zap/org_uber_go_zap-v1.25.0.zip",
"https://cache.hawkingrei.com/gomod/go.uber.org/zap/org_uber_go_zap-v1.25.0.zip",
"https://storage.googleapis.com/pingcapmirror/gomod/go.uber.org/zap/org_uber_go_zap-v1.25.0.zip",
],
)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Builder image
FROM rockylinux:9 as builder

ENV GOLANG_VERSION 1.20.5
ENV GOLANG_VERSION 1.21.0
ENV ARCH amd64
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-$ARCH.tar.gz
ENV GOPATH /go
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.enterprise
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Builder image
FROM rockylinux:9 as builder

ENV GOLANG_VERSION 1.20.5
ENV GOLANG_VERSION 1.21.0
ENV ARCH amd64
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-$ARCH.tar.gz
ENV GOPATH /go
Expand Down
29 changes: 12 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ endif
# Usage:
# make bench-daily TO=/path/to/file.json
bench-daily:
go test github.com/pingcap/tidb/session -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/executor -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/executor/test/splittest -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/tablecodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/expression -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/rowcodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/codec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/distsql -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test github.com/pingcap/tidb/util/benchdaily -run TestBenchDaily -bench Ignore \
go test -tags intest github.com/pingcap/tidb/session -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/executor -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/executor/test/splittest -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/tablecodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/expression -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/util/rowcodec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/util/codec -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/distsql -run TestBenchDaily -bench Ignore --outfile bench_daily.json
go test -tags intest github.com/pingcap/tidb/util/benchdaily -run TestBenchDaily -bench Ignore \
-date `git log -n1 --date=unix --pretty=format:%cd` \
-commit `git log -n1 --pretty=format:%h` \
-outfile $(TO)
Expand Down Expand Up @@ -433,21 +433,16 @@ generate_grafana_scripts:

bazel_ci_prepare:
bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) //:gazelle
bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable
bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable -prune
bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) //cmd/mirror:mirror -- --mirror> tmp.txt
mv tmp.txt DEPS.bzl
bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) \
--run_under="cd $(CURDIR) && " \
//tools/tazel:tazel

# "-prune" prunes some dependencies that are still needed. So it needs manual steps.
bazel_prune:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable -prune

bazel_prepare:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable -prune
bazel run \
--run_under="cd $(CURDIR) && " \
//tools/tazel:tazel
Expand All @@ -458,7 +453,7 @@ bazel_prepare:

bazel_ci_prepare_rbe:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable -prune
bazel run --//build:with_rbe_flag=true \
--run_under="cd $(CURDIR) && " \
//tools/tazel:tazel
Expand Down
10 changes: 10 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
aliases:
sig-critical-approvers-tidb-server:
- yudongusa
- easonn7
sig-critical-approvers-tidb-lightning:
- yudongusa
- easonn7
sig-critical-approvers-parser:
- yudongusa
- easonn7
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ go_download_sdk(
"https://mirrors.aliyun.com/golang/{}",
"https://dl.google.com/go/{}",
],
version = "1.20.6",
version = "1.21.0",
)

go_register_toolchains(
Expand Down
8 changes: 6 additions & 2 deletions bindinfo/capture_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"strings"
"testing"
"time"

"github.com/pingcap/tidb/bindinfo"
"github.com/pingcap/tidb/bindinfo/internal"
Expand Down Expand Up @@ -736,8 +737,11 @@ func TestCaptureWildcardFilter(t *testing.T) {
}

tk.MustExec("admin capture bindings")
rows := tk.MustQuery("show global bindings").Sort().Rows()
require.Len(t, rows, len(dbTbls))
var rows [][]interface{}
require.Eventually(t, func() bool {
rows = tk.MustQuery("show global bindings").Sort().Rows()
return len(rows) == len(dbTbls)
}, time.Second*2, time.Millisecond*100)
for _, r := range rows {
q := r[0].(string)
if _, exist := m[q]; !exist { // encounter an unexpected binding
Expand Down
7 changes: 7 additions & 0 deletions br/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See the OWNERS docs at https://go.k8s.io/owners
options:
no_parent_owners: true
filters:
"(OWNERS|tidb-lightning\\.tom)$":
approvers:
- sig-critical-approvers-tidb-lightning
41 changes: 41 additions & 0 deletions br/pkg/lightning/backend/external/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "external",
srcs = [
"byte_reader.go",
"codec.go",
"file.go",
"kv_reader.go",
"sharedisk.go",
"stat_reader.go",
],
importpath = "github.com/pingcap/tidb/br/pkg/lightning/backend/external",
visibility = ["//visibility:public"],
deps = [
"//br/pkg/storage",
"//util/logutil",
"//util/mathutil",
"@com_github_pingcap_errors//:errors",
"@org_uber_go_zap//:zap",
],
)

go_test(
name = "external_test",
timeout = "short",
srcs = [
"byte_reader_test.go",
"codec_test.go",
"file_test.go",
],
embed = [":external"],
flaky = True,
shard_count = 7,
deps = [
"//br/pkg/storage",
"@com_github_pingcap_errors//:errors",
"@com_github_stretchr_testify//require",
"@org_golang_x_exp//rand",
],
)

0 comments on commit 5540c1b

Please sign in to comment.