Skip to content

Commit

Permalink
*: merge master to feature/reorganize-partition (#38613)
Browse files Browse the repository at this point in the history
ref #38535
  • Loading branch information
mjonss committed Nov 15, 2022
1 parent 0d316ef commit 2b8c979
Show file tree
Hide file tree
Showing 865 changed files with 45,570 additions and 20,269 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
startup --host_jvm_args=-Xmx6g
startup --host_jvm_args=-Xmx5g
startup --unlimit_coredumps

run:ci --color=yes
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1
5.3.2
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git/
bazel-bin/
bazel-out/
bazel-tidb/
bazel-testlogs/
bin/
tidb-server/tidb-server
*.test.bin
cmd/
Dockerfile
1 change: 1 addition & 0 deletions .github/licenserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ header:
- "docs/"
- "br/"
- ".gitignore"
- ".dockerignore"
- ".gitattributes"
- ".cilinter.yaml"
- ".golangci.yml"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-br-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
check:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-compile-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
compile-windows:
if: github.event_name == 'push' || github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integration-test-dumpling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
integration-test:
strategy:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
check:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to comment on pull-requests

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
133 changes: 107 additions & 26 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def go_deps():
sum = "h1:zeZSRqj5yCg28tCkIV/z/lWbwvNm5qnKVS15PI8nhD0=",
version = "v0.1.0",
)
go_repository(
name = "com_github_acarl005_stripansi",
build_file_proto_mode = "disable",
importpath = "github.com/acarl005/stripansi",
sum = "h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=",
version = "v0.0.0-20180116102854-5a71ef0e047d",
)

go_repository(
name = "com_github_ajg_form",
Expand Down Expand Up @@ -711,6 +718,21 @@ def go_deps():
sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
version = "v1.1.1",
)
go_repository(
name = "com_github_decred_dcrd_crypto_blake256",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/crypto/blake256",
sum = "h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=",
version = "v1.0.0",
)
go_repository(
name = "com_github_decred_dcrd_dcrec_secp256k1_v4",
build_file_proto_mode = "disable",
importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4",
sum = "h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4=",
version = "v4.1.0",
)

go_repository(
name = "com_github_denis_tingaikin_go_header",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -1235,6 +1257,14 @@ def go_deps():
sum = "h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=",
version = "v1.0.2",
)
go_repository(
name = "com_github_goccy_go_json",
build_file_proto_mode = "disable",
importpath = "github.com/goccy/go-json",
sum = "h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk=",
version = "v0.9.11",
)

go_repository(
name = "com_github_godbus_dbus_v5",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -2239,6 +2269,49 @@ def go_deps():
sum = "h1:tC2y/ygPbMFSBOs3DcyaEMKnnwH7eYKzohOtRrf0SAg=",
version = "v1.1.0",
)
go_repository(
name = "com_github_lestrrat_go_blackmagic",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/blackmagic",
sum = "h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httpcc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httpcc",
sum = "h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE=",
version = "v1.0.1",
)
go_repository(
name = "com_github_lestrrat_go_httprc",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/httprc",
sum = "h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8=",
version = "v1.0.4",
)
go_repository(
name = "com_github_lestrrat_go_iter",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/iter",
sum = "h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI=",
version = "v1.0.2",
)
go_repository(
name = "com_github_lestrrat_go_jwx_v2",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/jwx/v2",
sum = "h1:RlyYNLV892Ed7+FTfj1ROoF6x7WxL965PGTHso/60G0=",
version = "v2.0.6",
)
go_repository(
name = "com_github_lestrrat_go_option",
build_file_proto_mode = "disable",
importpath = "github.com/lestrrat-go/option",
sum = "h1:WqAWL8kh8VcSoD6xjSH34/1m8yxluXQbDeKNfvFeEO4=",
version = "v1.0.0",
)

go_repository(
name = "com_github_lib_pq",
build_file_proto_mode = "disable",
Expand Down Expand Up @@ -2818,15 +2891,15 @@ def go_deps():
name = "com_github_pingcap_kvproto",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/kvproto",
sum = "h1:ceg4xjEEXNgPsScTQ5dtidiltLF4h17Y/jUqfyLAy9E=",
version = "v0.0.0-20220929075948-06e08d5ed64c",
sum = "h1:ho5XUD8DVCnkpEj8oiTR57FXDTXnH6znyLe0gyrtzKk=",
version = "v0.0.0-20221103025916-e7e21f0e9cd9",
)
go_repository(
name = "com_github_pingcap_log",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/log",
sum = "h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8=",
version = "v1.1.0",
sum = "h1:T7e5Low0BU2ZazI2dz2mh3W1qv+w8wtvq1YR8DneA0c=",
version = "v1.1.1-0.20221110065318-21a4942860b3",
)
go_repository(
name = "com_github_pingcap_sysutil",
Expand All @@ -2839,8 +2912,8 @@ def go_deps():
name = "com_github_pingcap_tipb",
build_file_proto_mode = "disable_global",
importpath = "github.com/pingcap/tipb",
sum = "h1:kWYridgsn8xSKYJ2EkXp7uj5HwJnG5snpY3XP8oYmPU=",
version = "v0.0.0-20220824081009-0714a57aff1d",
sum = "h1:Yoo8j5xQGxjlsC3yt0ndsiAz0WZXED9rzsKmEN0U0DY=",
version = "v0.0.0-20221020071514-cd933387bcb5",
)
go_repository(
name = "com_github_pkg_browser",
Expand Down Expand Up @@ -3205,8 +3278,8 @@ def go_deps():
name = "com_github_shurcool_vfsgen",
build_file_proto_mode = "disable_global",
importpath = "github.com/shurcooL/vfsgen",
sum = "h1:y0cMJ0qjii33BnD6tMGcF/+gHYsoKQ6tbwQpy233OII=",
version = "v0.0.0-20180711163814-62bca832be04",
sum = "h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0=",
version = "v0.0.0-20181202132449-6a9ea43bcacd",
)
go_repository(
name = "com_github_sirupsen_logrus",
Expand Down Expand Up @@ -3422,15 +3495,15 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
sum = "h1:/13jzD/AR7v3dCLweFQ2JG8bihh3HLVIci2tbOHHGW0=",
version = "v2.0.1-0.20221012074856-6def8d7b90c4",
sum = "h1:nFVdyTXcQYZwQQCdSJcFI1vBFyzG1hVuZ39MAK6wqK4=",
version = "v2.0.3-0.20221108030801-9c0835c80eba",
)
go_repository(
name = "com_github_tikv_pd_client",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/pd/client",
sum = "h1:REQOR1XraH1fT9BCoNBPZs1CAe+w7VPLU+d+si7DLYo=",
version = "v0.0.0-20221010134149-d50e5fe43f14",
sum = "h1:ckPpxKcl75mO2N6a4cJXiZH43hvcHPpqc9dh1TmH1nc=",
version = "v0.0.0-20221031025758-80f0d8ca4d07",
)
go_repository(
name = "com_github_timakin_bodyclose",
Expand Down Expand Up @@ -3584,12 +3657,20 @@ def go_deps():
sum = "h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=",
version = "v0.0.0-20161114210144-ceec8f93295a",
)
go_repository(
name = "com_github_vbauerster_mpb_v7",
build_file_proto_mode = "disable",
importpath = "github.com/vbauerster/mpb/v7",
sum = "h1:BkGfmb6nMrrBQDFECR/Q7RkKCw7ylMetCb4079CGs4w=",
version = "v7.5.3",
)

go_repository(
name = "com_github_vividcortex_ewma",
build_file_proto_mode = "disable_global",
importpath = "github.com/VividCortex/ewma",
sum = "h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM=",
version = "v1.1.1",
sum = "h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=",
version = "v1.2.0",
)
go_repository(
name = "com_github_wangjohn_quickselect",
Expand Down Expand Up @@ -4250,8 +4331,8 @@ def go_deps():
name = "org_golang_x_crypto",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/crypto",
sum = "h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=",
version = "v0.0.0-20220411220226-7b82a4e95df4",
sum = "h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_exp",
Expand Down Expand Up @@ -4300,8 +4381,8 @@ def go_deps():
name = "org_golang_x_net",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/net",
sum = "h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=",
version = "v0.0.0-20220722155237-a158d28d115b",
sum = "h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_oauth2",
Expand All @@ -4321,22 +4402,22 @@ def go_deps():
name = "org_golang_x_sys",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/sys",
sum = "h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=",
version = "v0.0.0-20220928140112-f11e5e49a4ec",
sum = "h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_term",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/term",
sum = "h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=",
version = "v0.0.0-20210927222741-03fcf44c2211",
sum = "h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw=",
version = "v0.1.0",
)
go_repository(
name = "org_golang_x_text",
build_file_proto_mode = "disable_global",
importpath = "golang.org/x/text",
sum = "h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=",
version = "v0.3.7",
sum = "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=",
version = "v0.4.0",
)
go_repository(
name = "org_golang_x_time",
Expand Down Expand Up @@ -4489,6 +4570,6 @@ def go_deps():
name = "org_uber_go_zap",
build_file_proto_mode = "disable_global",
importpath = "go.uber.org/zap",
sum = "h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=",
version = "v1.21.0",
sum = "h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=",
version = "v1.23.0",
)
46 changes: 10 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 PingCAP, Inc.
# Copyright 2022 PingCAP, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,45 +13,19 @@
# limitations under the License.

# Builder image
FROM golang:1.19.1-alpine as builder
FROM alpine:edge as builder

RUN apk add --no-cache \
wget \
make \
git \
gcc \
binutils-gold \
musl-dev
ADD . https://raw.githubusercontent.com/njhallett/apk-fastest-mirror/c4ca44caef3385d830fea34df2dbc2ba4a17e021/apk-fastest-mirror.sh ./proxy
RUN sh ./proxy/apk-fastest-mirror.sh -t 50 && apk add --no-cache git build-base go

RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \
&& chmod +x /usr/local/bin/dumb-init
COPY . /tidb
ARG GOPROXY
RUN export GOPROXY=${GOPROXY} && cd /tidb && make server

RUN mkdir -p /go/src/github.com/pingcap/tidb
WORKDIR /go/src/github.com/pingcap/tidb
FROM alpine:latest

# Cache dependencies
COPY go.mod .
COPY go.sum .
COPY parser/go.mod parser/go.mod
COPY parser/go.sum parser/go.sum

RUN GO111MODULE=on go mod download

# Build real binaries
COPY . .
RUN make

# Executable image
FROM alpine

RUN apk add --no-cache \
curl

COPY --from=builder /go/src/github.com/pingcap/tidb/bin/tidb-server /tidb-server
COPY --from=builder /usr/local/bin/dumb-init /usr/local/bin/dumb-init
COPY --from=builder /tidb/bin/tidb-server /tidb-server

WORKDIR /

EXPOSE 4000

ENTRYPOINT ["/usr/local/bin/dumb-init", "/tidb-server"]
ENTRYPOINT ["/tidb-server"]
Loading

0 comments on commit 2b8c979

Please sign in to comment.