diff --git a/.bazelrc b/.bazelrc index 0f538d661b0da..a8227f6e53562 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,11 +6,6 @@ run:ci --color=yes build --announce_rc build --experimental_guard_against_concurrent_changes -build --experimental_remote_merkle_tree_cache -build --java_language_version=17 -build --java_runtime_version=17 -build --tool_java_language_version=17 -build --tool_java_runtime_version=17 build --incompatible_strict_action_env --incompatible_enable_cc_toolchain_resolution build:ci --color=yes build:ci --experimental_remote_cache_compression diff --git a/.bazelversion b/.bazelversion index 815da58b7a9ed..bfe365e7779da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.4.1 +7.7.1 \ No newline at end of file diff --git a/DEPS.bzl b/DEPS.bzl index 7b3a30bcb0507..4aa142c8d2c32 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -736,13 +736,13 @@ def go_deps(): name = "com_github_burntsushi_toml", build_file_proto_mode = "disable_global", importpath = "github.com/BurntSushi/toml", - sha256 = "f15f0ca7a3c5a4275d3d560236f178e9d735a084534bf3b685ec5f676806230a", - strip_prefix = "github.com/BurntSushi/toml@v1.4.1-0.20240526193622-a339e1f7089c", + sha256 = "a10c8d3d6c4a9b73dc885464245eec6b27d64f430d6979389cd9c58adde15855", + strip_prefix = "github.com/BurntSushi/toml@v1.5.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.1-0.20240526193622-a339e1f7089c.zip", - "http://ats.apps.svc/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.1-0.20240526193622-a339e1f7089c.zip", - "https://cache.hawkingrei.com/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.1-0.20240526193622-a339e1f7089c.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.1-0.20240526193622-a339e1f7089c.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.5.0.zip", + "http://ats.apps.svc/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.5.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.5.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.5.0.zip", ], ) go_repository( @@ -4268,13 +4268,13 @@ def go_deps(): name = "com_github_klauspost_compress", build_file_proto_mode = "disable_global", importpath = "github.com/klauspost/compress", - sha256 = "88dea800cc6a11ccb9dd2f0dd487f30e8701870abdfc11245e41dcfc9f3d428e", - strip_prefix = "github.com/klauspost/compress@v1.17.11", + sha256 = "c4679e4cbc820a21758199d985be754abf5eb2a38e6f1de95cd70b2e7ef06905", + strip_prefix = "github.com/klauspost/compress@v1.18.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.17.11.zip", - "http://ats.apps.svc/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.17.11.zip", - "https://cache.hawkingrei.com/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.17.11.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.17.11.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.18.0.zip", + "http://ats.apps.svc/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.18.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.18.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/klauspost/compress/com_github_klauspost_compress-v1.18.0.zip", ], ) go_repository( @@ -4775,13 +4775,13 @@ def go_deps(): name = "com_github_masterminds_semver_v3", build_file_proto_mode = "disable_global", importpath = "github.com/Masterminds/semver/v3", - sha256 = "b492e8f6fa4c8240234a6d5095521f75d9e2e7c52672b90b5afde533281b540f", - strip_prefix = "github.com/Masterminds/semver/v3@v3.3.0", + sha256 = "e1b204876a92f8aae3488670395d8ee0813fc775cd883727f47768e9040905eb", + strip_prefix = "github.com/Masterminds/semver/v3@v3.3.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.0.zip", - "http://ats.apps.svc/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.1.zip", + "http://ats.apps.svc/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.3.1.zip", ], ) go_repository( @@ -5542,13 +5542,13 @@ def go_deps(): name = "com_github_petermattis_goid", build_file_proto_mode = "disable_global", importpath = "github.com/petermattis/goid", - sha256 = "3f47ab8e5713c36ec5b4295956a5ef012a192bc19198ae1b6591408c061e97ab", - strip_prefix = "github.com/petermattis/goid@v0.0.0-20240813172612-4fcff4a6cae7", + sha256 = "9bf0da79dd558ac6695d99ae547993fb34502eb255ce7cc6494fb03131b959c2", + strip_prefix = "github.com/petermattis/goid@v0.0.0-20250813065127-a731cc31b4fe", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20240813172612-4fcff4a6cae7.zip", - "http://ats.apps.svc/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20240813172612-4fcff4a6cae7.zip", - "https://cache.hawkingrei.com/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20240813172612-4fcff4a6cae7.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20240813172612-4fcff4a6cae7.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20250813065127-a731cc31b4fe.zip", + "http://ats.apps.svc/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20250813065127-a731cc31b4fe.zip", + "https://cache.hawkingrei.com/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20250813065127-a731cc31b4fe.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/petermattis/goid/com_github_petermattis_goid-v0.0.0-20250813065127-a731cc31b4fe.zip", ], ) go_repository( @@ -5841,39 +5841,39 @@ def go_deps(): name = "com_github_prometheus_client_golang", build_file_proto_mode = "disable_global", importpath = "github.com/prometheus/client_golang", - sha256 = "b76de10864f49c87a347b9a3e6fe606c1f93ed091de7d0d1d17a5967a60f5ce2", - strip_prefix = "github.com/prometheus/client_golang@v1.20.5", + sha256 = "f104d43e35b9217845792ec8eabbde59e31a11aaba64c47408cff8bafde2aa9e", + strip_prefix = "github.com/prometheus/client_golang@v1.23.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.20.5.zip", - "http://ats.apps.svc/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.20.5.zip", - "https://cache.hawkingrei.com/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.20.5.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.20.5.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.23.0.zip", + "http://ats.apps.svc/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.23.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.23.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/client_golang/com_github_prometheus_client_golang-v1.23.0.zip", ], ) go_repository( name = "com_github_prometheus_client_model", build_file_proto_mode = "disable_global", importpath = "github.com/prometheus/client_model", - sha256 = "8cd4703b4f1ab7eaa4b925c06a174bc84c93514d0969ac2a20ba51120cd4cab7", - strip_prefix = "github.com/prometheus/client_model@v0.6.1", + sha256 = "67017b19f220c6ab91ecfdd10a93824e2a8b09fcb6390054dbdc49df3354a9ca", + strip_prefix = "github.com/prometheus/client_model@v0.6.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.1.zip", - "http://ats.apps.svc/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.2.zip", + "http://ats.apps.svc/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/client_model/com_github_prometheus_client_model-v0.6.2.zip", ], ) go_repository( name = "com_github_prometheus_common", build_file_proto_mode = "disable_global", importpath = "github.com/prometheus/common", - sha256 = "f69de750db71d71076a6ca22b366f4c22263133315838b2d28dff0f2d075ea2c", - strip_prefix = "github.com/prometheus/common@v0.57.0", + sha256 = "c97b1ab4d2c723923b367dbe48c283eafc0b94eb14faf8c98d81746b015242a9", + strip_prefix = "github.com/prometheus/common@v0.65.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.57.0.zip", - "http://ats.apps.svc/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.57.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.57.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.57.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.65.0.zip", + "http://ats.apps.svc/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.65.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.65.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/common/com_github_prometheus_common-v0.65.0.zip", ], ) go_repository( @@ -5919,13 +5919,13 @@ def go_deps(): name = "com_github_prometheus_procfs", build_file_proto_mode = "disable_global", importpath = "github.com/prometheus/procfs", - sha256 = "d31ad13f1ae121d842ff0f243d029c247e68710edab8a358d6366a67b7feaa6d", - strip_prefix = "github.com/prometheus/procfs@v0.15.1", + sha256 = "354e627c196c228369c9e97bca5ff59d8ce2b338756de249d8d343226424c76f", + strip_prefix = "github.com/prometheus/procfs@v0.19.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.15.1.zip", - "http://ats.apps.svc/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.15.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.15.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.15.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.19.2.zip", + "http://ats.apps.svc/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.19.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.19.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/prometheus/procfs/com_github_prometheus_procfs-v0.19.2.zip", ], ) go_repository( @@ -6218,13 +6218,13 @@ def go_deps(): name = "com_github_sasha_s_go_deadlock", build_file_proto_mode = "disable_global", importpath = "github.com/sasha-s/go-deadlock", - sha256 = "b927f67dd9a6dc183bac7249c019775e689aee67dc52bfa53354137139d722a1", - strip_prefix = "github.com/sasha-s/go-deadlock@v0.3.5", + sha256 = "3fc61a5bf78d5d069069dc3d531dfff4ac90406bdf28943d11cb5a3faaf77fc8", + strip_prefix = "github.com/sasha-s/go-deadlock@v0.3.6", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.5.zip", - "http://ats.apps.svc/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.5.zip", - "https://cache.hawkingrei.com/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.5.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.5.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.6.zip", + "http://ats.apps.svc/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.6.zip", + "https://cache.hawkingrei.com/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.6.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sasha-s/go-deadlock/com_github_sasha_s_go_deadlock-v0.3.6.zip", ], ) go_repository( @@ -6361,26 +6361,26 @@ def go_deps(): name = "com_github_shoenig_go_m1cpu", build_file_proto_mode = "disable_global", importpath = "github.com/shoenig/go-m1cpu", - sha256 = "0ceab2ec73ef7d1291bd7663dd39203ee7037ee9dccb6fc3381ad819bd8550d1", - strip_prefix = "github.com/shoenig/go-m1cpu@v0.1.6", + sha256 = "fc7a3ee160a892788fa143559d9157cbee663273484d9a23e4a6093bc35c5b9e", + strip_prefix = "github.com/shoenig/go-m1cpu@v0.1.7", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.6.zip", - "http://ats.apps.svc/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.6.zip", - "https://cache.hawkingrei.com/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.6.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.6.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.7.zip", + "http://ats.apps.svc/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.7.zip", + "https://cache.hawkingrei.com/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.7.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shoenig/go-m1cpu/com_github_shoenig_go_m1cpu-v0.1.7.zip", ], ) go_repository( name = "com_github_shoenig_test", build_file_proto_mode = "disable_global", importpath = "github.com/shoenig/test", - sha256 = "c2f3912a0f4bb15e24d2c61beb63bd3093aafafb033c1ab71c0918c352df0781", - strip_prefix = "github.com/shoenig/test@v0.6.4", + sha256 = "943689de6556f7870a400b44735cf6fe98c5dc4fbae1c5dd4c96ca9011171b1f", + strip_prefix = "github.com/shoenig/test@v1.7.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/shoenig/test/com_github_shoenig_test-v0.6.4.zip", - "http://ats.apps.svc/gomod/github.com/shoenig/test/com_github_shoenig_test-v0.6.4.zip", - "https://cache.hawkingrei.com/gomod/github.com/shoenig/test/com_github_shoenig_test-v0.6.4.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shoenig/test/com_github_shoenig_test-v0.6.4.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/shoenig/test/com_github_shoenig_test-v1.7.0.zip", + "http://ats.apps.svc/gomod/github.com/shoenig/test/com_github_shoenig_test-v1.7.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/shoenig/test/com_github_shoenig_test-v1.7.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shoenig/test/com_github_shoenig_test-v1.7.0.zip", ], ) go_repository( @@ -6946,26 +6946,26 @@ def go_deps(): name = "com_github_tklauser_go_sysconf", build_file_proto_mode = "disable_global", importpath = "github.com/tklauser/go-sysconf", - sha256 = "95a4a24b6f5fc5af05d94bbab39ff847a220d30c5adb4fb0a09f9c7926a2ffe8", - strip_prefix = "github.com/tklauser/go-sysconf@v0.3.12", + sha256 = "caa29c6df6c316969c9f2559186bd1ca8f8aceafbef236233e415c1d974f0383", + strip_prefix = "github.com/tklauser/go-sysconf@v0.3.15", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.12.zip", - "http://ats.apps.svc/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.12.zip", - "https://cache.hawkingrei.com/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.12.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.12.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.15.zip", + "http://ats.apps.svc/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.15.zip", + "https://cache.hawkingrei.com/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.15.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tklauser/go-sysconf/com_github_tklauser_go_sysconf-v0.3.15.zip", ], ) go_repository( name = "com_github_tklauser_numcpus", build_file_proto_mode = "disable_global", importpath = "github.com/tklauser/numcpus", - sha256 = "267c7f91c5be3f1d091ee215825f91c315196f45e1fd6c4e8abb447f38549e03", - strip_prefix = "github.com/tklauser/numcpus@v0.6.1", + sha256 = "b2526d47517ccff481cc7baad7f450bdde58ddb9b65d53e3eec7c3504f94e853", + strip_prefix = "github.com/tklauser/numcpus@v0.10.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.6.1.zip", - "http://ats.apps.svc/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.6.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.6.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.6.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.10.0.zip", + "http://ats.apps.svc/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.10.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.10.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tklauser/numcpus/com_github_tklauser_numcpus-v0.10.0.zip", ], ) go_repository( @@ -7388,13 +7388,13 @@ def go_deps(): name = "com_github_yuin_goldmark", build_file_proto_mode = "disable_global", importpath = "github.com/yuin/goldmark", - sha256 = "bb41a602b174345fda392c8ad83fcc93217c285c763699677630be90feb7a5e3", - strip_prefix = "github.com/yuin/goldmark@v1.4.13", + sha256 = "88a6178916d7196838692fc41facc5429ab3bcc75d6270c180dfee36e14e6a94", + strip_prefix = "github.com/yuin/goldmark@v1.7.13", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.4.13.zip", - "http://ats.apps.svc/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.4.13.zip", - "https://cache.hawkingrei.com/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.4.13.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.4.13.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.7.13.zip", + "http://ats.apps.svc/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.7.13.zip", + "https://cache.hawkingrei.com/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.7.13.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/yuin/goldmark/com_github_yuin_goldmark-v1.7.13.zip", ], ) go_repository( @@ -9832,26 +9832,26 @@ def go_deps(): name = "org_golang_google_protobuf", build_file_proto_mode = "disable_global", importpath = "google.golang.org/protobuf", - sha256 = "3294ac8ea5089b3c231351afaea4f012e8027a9beeb523bbf31dcb383cc0ab99", - strip_prefix = "google.golang.org/protobuf@v1.36.6", + sha256 = "9265fbe7d073ca8571f1a9c4b8e8f20b244c35ad913346892d688e58fe4b1f22", + strip_prefix = "google.golang.org/protobuf@v1.36.10", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.6.zip", - "http://ats.apps.svc/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.6.zip", - "https://cache.hawkingrei.com/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.6.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.6.zip", + "http://bazel-cache.pingcap.net:8080/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.10.zip", + "http://ats.apps.svc/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.10.zip", + "https://cache.hawkingrei.com/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.10.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/google.golang.org/protobuf/org_golang_google_protobuf-v1.36.10.zip", ], ) go_repository( name = "org_golang_x_crypto", build_file_proto_mode = "disable_global", importpath = "golang.org/x/crypto", - sha256 = "7da981b09d79d021f79ea2953637a85e3c72e43fc88b6a3230e7976fbbeec2de", - strip_prefix = "golang.org/x/crypto@v0.41.0", + sha256 = "31a0dbb663b78708159bc1cbdb09a6a8370cbf507d742f96dc78b4ad023498ec", + strip_prefix = "golang.org/x/crypto@v0.44.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.41.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.41.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.41.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.41.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.44.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.44.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.44.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.44.0.zip", ], ) go_repository( @@ -9923,39 +9923,39 @@ def go_deps(): name = "org_golang_x_mod", build_file_proto_mode = "disable_global", importpath = "golang.org/x/mod", - sha256 = "19fb241d46e4397d3193b5fa899e2a9d62bb5d1c41f73d09d29c17c3c0d3953c", - strip_prefix = "golang.org/x/mod@v0.27.0", + sha256 = "dffdae50c0a7903e522053e8e9880069ed1854446326f954cf903f713678c3a2", + strip_prefix = "golang.org/x/mod@v0.30.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/mod/org_golang_x_mod-v0.27.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/mod/org_golang_x_mod-v0.27.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/mod/org_golang_x_mod-v0.27.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/mod/org_golang_x_mod-v0.27.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/mod/org_golang_x_mod-v0.30.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/mod/org_golang_x_mod-v0.30.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/mod/org_golang_x_mod-v0.30.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/mod/org_golang_x_mod-v0.30.0.zip", ], ) go_repository( name = "org_golang_x_net", build_file_proto_mode = "disable_global", importpath = "golang.org/x/net", - sha256 = "cc9f79d1c8a796c756b636cee007b4ac5eba7b1f3276cd42658f4ac4a28cfbc1", - strip_prefix = "golang.org/x/net@v0.42.0", + sha256 = "3444c04eff1dc7a41a6386cb6a0b0b1facebfc7e222bae523043ed4b14039f76", + strip_prefix = "golang.org/x/net@v0.47.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.42.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.42.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.42.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.42.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.47.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.47.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.47.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.47.0.zip", ], ) go_repository( name = "org_golang_x_oauth2", build_file_proto_mode = "disable_global", importpath = "golang.org/x/oauth2", - sha256 = "3d90c61cc10984c81b5d605c0ebd3be61b34b62c4aeba92c11fc86d1fade635a", - strip_prefix = "golang.org/x/oauth2@v0.27.0", + sha256 = "8e7f40820982ac95900c4d44888f68d97c979d162219f6f8713c3516fabcca31", + strip_prefix = "golang.org/x/oauth2@v0.33.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.27.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.27.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.27.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.27.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.33.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.33.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.33.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/oauth2/org_golang_x_oauth2-v0.33.0.zip", ], ) go_repository( @@ -9975,91 +9975,91 @@ def go_deps(): name = "org_golang_x_sync", build_file_proto_mode = "disable_global", importpath = "golang.org/x/sync", - sha256 = "ca43984183eb14f7f50d33da350312fed1c42e106dceac2437bfd5084b497dcd", - strip_prefix = "golang.org/x/sync@v0.16.0", + sha256 = "939a1a573cd83df56836b637052a45f6a60f78b86a5a375fc0c6c298a868a14d", + strip_prefix = "golang.org/x/sync@v0.18.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sync/org_golang_x_sync-v0.16.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/sync/org_golang_x_sync-v0.16.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/sync/org_golang_x_sync-v0.16.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sync/org_golang_x_sync-v0.16.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sync/org_golang_x_sync-v0.18.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/sync/org_golang_x_sync-v0.18.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/sync/org_golang_x_sync-v0.18.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sync/org_golang_x_sync-v0.18.0.zip", ], ) go_repository( name = "org_golang_x_sys", build_file_proto_mode = "disable_global", importpath = "golang.org/x/sys", - sha256 = "dc3c20611168aaa8fda0d71999be1a5222a0ba57bc767c978a590e41ff2ede35", - strip_prefix = "golang.org/x/sys@v0.35.0", + sha256 = "dacd7c9aa2b298f966822da214c6d601da08f14d41b29032bcac4bc503887a49", + strip_prefix = "golang.org/x/sys@v0.38.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sys/org_golang_x_sys-v0.35.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/sys/org_golang_x_sys-v0.35.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/sys/org_golang_x_sys-v0.35.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sys/org_golang_x_sys-v0.35.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sys/org_golang_x_sys-v0.38.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/sys/org_golang_x_sys-v0.38.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/sys/org_golang_x_sys-v0.38.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sys/org_golang_x_sys-v0.38.0.zip", ], ) go_repository( name = "org_golang_x_telemetry", build_file_proto_mode = "disable_global", importpath = "golang.org/x/telemetry", - sha256 = "05ec70dbe6ef46c881f7d7ebe70ff61d9e998d2b4bbdbe6ff968870ef86c67b9", - strip_prefix = "golang.org/x/telemetry@v0.0.0-20250710130107-8d8967aff50b", + sha256 = "964c76120c73c1f94ee0d38a9307b19949eaa314dcccfeff6db43d63e21f57cd", + strip_prefix = "golang.org/x/telemetry@v0.0.0-20251111182119-bc8e575c7b54", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20250710130107-8d8967aff50b.zip", - "http://ats.apps.svc/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20250710130107-8d8967aff50b.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20250710130107-8d8967aff50b.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20250710130107-8d8967aff50b.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20251111182119-bc8e575c7b54.zip", + "http://ats.apps.svc/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20251111182119-bc8e575c7b54.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20251111182119-bc8e575c7b54.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/telemetry/org_golang_x_telemetry-v0.0.0-20251111182119-bc8e575c7b54.zip", ], ) go_repository( name = "org_golang_x_term", build_file_proto_mode = "disable_global", importpath = "golang.org/x/term", - sha256 = "22281cbf30560433d57de8d72c1151f9cac2917795dc6e9f694f7a525bb5309c", - strip_prefix = "golang.org/x/term@v0.34.0", + sha256 = "ffd8a74e9a9fd13e1080fa4e8f807693e438fda98f336992cb2a2420d2e95e61", + strip_prefix = "golang.org/x/term@v0.37.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/term/org_golang_x_term-v0.34.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/term/org_golang_x_term-v0.34.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/term/org_golang_x_term-v0.34.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/term/org_golang_x_term-v0.34.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/term/org_golang_x_term-v0.37.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/term/org_golang_x_term-v0.37.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/term/org_golang_x_term-v0.37.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/term/org_golang_x_term-v0.37.0.zip", ], ) go_repository( name = "org_golang_x_text", build_file_proto_mode = "disable_global", importpath = "golang.org/x/text", - sha256 = "46259e1416ae7ec6adf1867c5f9fab32af0476a148e3c95f1dfbb134f4acf48d", - strip_prefix = "golang.org/x/text@v0.28.0", + sha256 = "10d76a358ae35fae9523ffef7b378ec30f2e73bc3f99ba40e46a6cb722ad888a", + strip_prefix = "golang.org/x/text@v0.31.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.28.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.28.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.28.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.28.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.31.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.31.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.31.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.31.0.zip", ], ) go_repository( name = "org_golang_x_time", build_file_proto_mode = "disable_global", importpath = "golang.org/x/time", - sha256 = "ce9157f4961055bd942bbb02666ca5be9f92c92f8e64361aede9d1090df44464", - strip_prefix = "golang.org/x/time@v0.7.0", + sha256 = "0e2d2e47d107859130c7088346966d99a14ec0f7a42290c4acc0e2cc568e7a81", + strip_prefix = "golang.org/x/time@v0.14.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/time/org_golang_x_time-v0.7.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/time/org_golang_x_time-v0.7.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/time/org_golang_x_time-v0.7.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/time/org_golang_x_time-v0.7.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/time/org_golang_x_time-v0.14.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/time/org_golang_x_time-v0.14.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/time/org_golang_x_time-v0.14.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/time/org_golang_x_time-v0.14.0.zip", ], ) go_repository( name = "org_golang_x_tools", build_file_proto_mode = "disable_global", importpath = "golang.org/x/tools", - sha256 = "6d2391d8a9a89e54c79cdeaf5e776dfc079838c90c3ac49e97fd91cf20606e9a", - strip_prefix = "golang.org/x/tools@v0.35.0", + sha256 = "498ead1f3de646754a152c14fcaade9b03f86114b2746b65367e3540c1acbcde", + strip_prefix = "golang.org/x/tools@v0.39.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/tools/org_golang_x_tools-v0.35.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/tools/org_golang_x_tools-v0.35.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/tools/org_golang_x_tools-v0.35.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/org_golang_x_tools-v0.35.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/tools/org_golang_x_tools-v0.39.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/tools/org_golang_x_tools-v0.39.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/tools/org_golang_x_tools-v0.39.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/org_golang_x_tools-v0.39.0.zip", ], ) go_repository( @@ -10088,6 +10088,19 @@ def go_deps(): "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/go/packages/packagestest/org_golang_x_tools_go_packages_packagestest-v0.1.1-deprecated.zip", ], ) + go_repository( + name = "org_golang_x_tools_godoc", + build_file_proto_mode = "disable_global", + importpath = "golang.org/x/tools/godoc", + sha256 = "70ba09baef991067b3eb8f36df3e6e9b25417349295f5d475cdcf049b8343cff", + strip_prefix = "golang.org/x/tools/godoc@v0.1.0-deprecated", + urls = [ + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/tools/godoc/org_golang_x_tools_godoc-v0.1.0-deprecated.zip", + "http://ats.apps.svc/gomod/golang.org/x/tools/godoc/org_golang_x_tools_godoc-v0.1.0-deprecated.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/tools/godoc/org_golang_x_tools_godoc-v0.1.0-deprecated.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/godoc/org_golang_x_tools_godoc-v0.1.0-deprecated.zip", + ], + ) go_repository( name = "org_golang_x_xerrors", build_file_proto_mode = "disable_global", diff --git a/Makefile b/Makefile index c411eea2c8151..e015c2c0bb7fe 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ check-setup:tools/bin/revive precheck: fmt bazel_prepare .PHONY: check -check: check-bazel-prepare parser_yacc check-parallel lint tidy testSuite errdoc license +check: check-bazel-prepare parser_yacc check-parallel lint tidy testSuite errdoc license bazel_check_abi .PHONY: fmt fmt: @@ -649,6 +649,14 @@ bazel_bin: ## Build importer/tidb binary files with Bazel build system cp -f ${TIDB_SERVER_PATH} ./bin/ ; \ cp -f ${IMPORTER_PATH} ./bin/ ; +.PHONY: bazel_bin +bazel_bin: ## Build importer/tidb binary files with Bazel build system + mkdir -p bin; \ + bazel $(BAZEL_GLOBAL_CONFIG) build $(BAZEL_CMD_CONFIG) \ + //cmd/importer:importer //cmd/tidb-server:tidb-server --define gotags=$(BUILD_TAGS) --norun_validations ;\ + cp -f ${TIDB_SERVER_PATH} ./bin/ ; \ + cp -f ${IMPORTER_PATH} ./bin/ ; + .PHONY: bazel_build bazel_build: mkdir -p bin @@ -840,3 +848,8 @@ bazel_sync: .PHONY: bazel_mirror_upload bazel_mirror_upload: bazel $(BAZEL_GLOBAL_CONFIG) run $(BAZEL_CMD_CONFIG) //cmd/mirror -- --mirror --upload + +.PHONY: bazel_check_abi +bazel_check_abi: + @echo "check ABI compatibility" + ./tools/check/bazel-check-abi.sh diff --git a/Makefile.common b/Makefile.common index 8a59f8a9fe96f..a5041b692e793 100644 --- a/Makefile.common +++ b/Makefile.common @@ -26,6 +26,7 @@ FAIL_ON_STDOUT := awk '{ print } END { if (NR > 0) { exit 1 } }' CURDIR := $(shell pwd) path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin export PATH := $(path_to_add):$(PATH) +export GOTOOLCHAIN := go1.25.5 GO := GO111MODULE=on go BUILD_FLAG := -tags codes diff --git a/WORKSPACE b/WORKSPACE index b2e63a9aa51ff..64e4b9d8e4642 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,15 +1,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# Required by toolchains_protoc. http_archive( name = "platforms", - sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", - "https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/1.0.0/platforms-1.0.0.tar.gz", + "https://github.com/bazelbuild/platforms/releases/download/1.0.0/platforms-1.0.0.tar.gz", ], + sha256 = "3384eb1c30762704fbe38e440204e114154086c8fc8a8c2e3e28441028c019a8", ) +# To use the new Starlark host platform in @platforms, also include the following snippet: +load("@platforms//host:extension.bzl", "host_platform_repo") +host_platform_repo(name = "host_platform") + http_archive( name = "bazel_features", sha256 = "ba1282c1aa1d1fffdcf994ab32131d7c7551a9bc960fbf05f42d55a1b930cbfb", @@ -33,42 +35,61 @@ http_archive( ) load("@bazel_skylib//lib:versions.bzl", "versions") + versions.check(minimum_bazel_version = "6.0.0") http_archive( name = "io_bazel_rules_go", - sha256 = "f4a9314518ca6acfa16cc4ab43b0b8ce1e4ea64b81c38d8a3772883f153346b8", + sha256 = "68af54cb97fbdee5e5e8fe8d210d15a518f9d62abfd71620c3eaff3b26a5ff86", urls = [ - "http://bazel-cache.pingcap.net:8080/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", - "http://ats.apps.svc/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", + "http://bazel-cache.pingcap.net:8080/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", + "http://ats.apps.svc/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", + "https://cache.hawkingrei.com/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", + "https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", + "https://github.com/bazel-contrib/rules_go/releases/download/v0.59.0/rules_go-v0.59.0.zip", ], ) http_archive( name = "bazel_gazelle", - sha256 = "8ad77552825b078a10ad960bec6ef77d2ff8ec70faef2fd038db713f410f5d87", + sha256 = "675114d8b433d0a9f54d81171833be96ebc4113115664b791e6f204d58e93446", urls = [ - "http://bazel-cache.pingcap.net:8080/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz", - "http://ats.apps.svc/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz", + "http://bazel-cache.pingcap.net:8080/bazel-contrib/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz", + "https://github.com/bazel-contrib/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz", + "http://ats.apps.svc/bazel-contrib/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz", + "https://cache.hawkingrei.com/bazel-contrib/bazel-gazelle/releases/download/v0.47.0/bazel-gazelle-v0.47.0.tar.gz", ], ) http_archive( name = "rules_cc", + sha256 = "d62624b45e0912713dcd3b8e30ba6ae55418ed6bf99e6d135cd61b8addae312b", + strip_prefix = "rules_cc-0.1.2", urls = [ - "http://bazel-cache.pingcap.net:8080/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz", - "https://github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz", - "http://ats.apps.svc/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz", + "http://bazel-cache.pingcap.net:8080/bazelbuild/rules_cc/releases/download/0.1.2/rules_cc-0.1.2.tar.gz", + "https://github.com/bazelbuild/rules_cc/releases/download/0.1.2/rules_cc-0.1.2.tar.gz", + "http://ats.apps.svc/bazelbuild/rules_cc/releases/download/0.1.2/rules_cc-0.1.2.tar.gz", ], - sha256 = "3d9e271e2876ba42e114c9b9bc51454e379cbf0ec9ef9d40e2ae4cec61a31b40", - strip_prefix = "rules_cc-0.0.6", ) -load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies") +http_archive( + name = "rules_python", + sha256 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3", + strip_prefix = "rules_python-1.4.1", + urls = [ + "http://bazel-cache.pingcap.net:8080/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz", + "https://github.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz", + "http://ats.apps.svc/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz", + "https://cache.hawkingrei.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz", + ], +) + +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_toolchains", "go_rules_dependencies") load("//:DEPS.bzl", "go_deps") # gazelle:repository_macro DEPS.bzl%go_deps @@ -85,24 +106,23 @@ go_download_sdk( "https://mirrors.aliyun.com/golang/{}", "https://dl.google.com/go/{}", ], - version = "1.23.6", + version = "1.25.5", ) +gazelle_dependencies(go_sdk = "go_sdk") + go_register_toolchains( nogo = "@//build:tidb_nogo", ) -gazelle_dependencies() - http_archive( name = "com_google_protobuf", - sha256 = "bc3dbf1f09dba1b2eb3f2f70352ee97b9049066c9040ce0c9b67fb3294e91e4b", - strip_prefix = "protobuf-3.15.5", + integrity = "sha256-zl0At4RQoMpAC/NgrADA1ZnMIl8EnZhqJ+mk45bFqEo=", + strip_prefix = "protobuf-29.0-rc2", # latest, as of 2021-03-08 urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/rules/protobuf-3.15.5.tar.gz ", - "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz", - "https://github.com/protocolbuffers/protobuf/archive/v3.15.5.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v29.0-rc2.tar.gz", + "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v29.0-rc2.tar.gz", ], ) @@ -114,10 +134,10 @@ http_archive( name = "remote_java_tools", sha256 = "f58a358ca694a41416a9b6a92b852935ad301d8882e5d22f4f11134f035317d5", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools-v12.6.zip", - "http://ats.apps.svc/gomod/rules/java_tools-v12.6.zip", - "https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools-v12.6.zip", - "https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools-v12.6.zip", + "http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools-v12.6.zip", + "http://ats.apps.svc/gomod/rules/java_tools-v12.6.zip", + "https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools-v12.6.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools-v12.6.zip", ], ) @@ -125,10 +145,10 @@ http_archive( name = "remote_java_tools_linux", sha256 = "64294e91fe940c77e6d35818b4c3a1f07d78e33add01e330188d907032687066", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools_linux-v12.6.zip", - "http://ats.apps.svc/gomod/rules/java_tools_linux-v12.6.zip", - "https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools_linux-v12.6.zip", - "https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools_linux-v12.6.zip", + "http://bazel-cache.pingcap.net:8080/gomod/rules/java_tools_linux-v12.6.zip", + "http://ats.apps.svc/gomod/rules/java_tools_linux-v12.6.zip", + "https://mirror.bazel.build/bazel_java_tools/releases/java/v12.6/java_tools_linux-v12.6.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v12.6/java_tools_linux-v12.6.zip", ], ) diff --git a/build/image/base b/build/image/base index 630e90088647c..c3126a48323bc 100644 --- a/build/image/base +++ b/build/image/base @@ -18,7 +18,7 @@ FROM quay.io/rockylinux/rockylinux:8.10.20240528 # setup mariadb repo # ref: https://mariadb.com/docs/server/connect/clients/mariadb-client/#Linux_(Repository) RUN curl -LsSO https://r.mariadb.com/downloads/mariadb_repo_setup \ - && echo "6083ef1974d11f49d42ae668fb9d513f7dc2c6276ffa47caed488c4b47268593 mariadb_repo_setup" | sha256sum -c - \ + && echo "7a3e1610fee91347e198214e3672a6d3932ccbbf67905d9e892e9255baaec292 mariadb_repo_setup" | sha256sum -c - \ && chmod +x mariadb_repo_setup \ && ./mariadb_repo_setup \ && rm mariadb_repo_setup @@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/var/cache/dnf \ # install golang toolchain # renovate: datasource=docker depName=golang -ARG GOLANG_VERSION=1.23.6 +ARG GOLANG_VERSION=1.25.5 RUN OS=linux; ARCH=$([ "$(arch)" = "x86_64" ] && echo amd64 || echo arm64); \ curl -fsSL https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz | tar -C /usr/local -xz ENV PATH /usr/local/go/bin/:$PATH @@ -62,7 +62,7 @@ ENV PATH=$PATH:/opt/gradle-${GRADLE_VER}/bin #### install tools: bazelisk, codecov, oras # renovate: datasource=github-tags depName=bazelbuild/bazelisk -ADD https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64 /usr/bin/bazel +ADD https://github.com/bazelbuild/bazel/releases/download/7.7.1/bazel-7.7.1-linux-x86_64 /usr/bin/bazel RUN chmod +x /usr/bin/bazel # codecov tool @@ -74,4 +74,4 @@ RUN folder=$([ "$(arch)" = "x86_64" ] && echo linux || echo aarch64); \ # oras tool # renovate: datasource=github-tags depName=oras-project/oras -COPY --from=bitnami/oras:1.2.0 /oras /usr/local/bin/oras +COPY --from=public.ecr.aws/bitnami/oras:1.2.0 /oras /usr/local/bin/oras diff --git a/build/image/centos7_jenkins b/build/image/centos7_jenkins index a1e980f086b4c..38c1c5d9ec6f1 100644 --- a/build/image/centos7_jenkins +++ b/build/image/centos7_jenkins @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM hub.pingcap.net/wangweizhen/base_image:go12320241009 +FROM hub.pingcap.net/wangweizhen/base_image:go12520251210 ENV GOPATH /go ENV GOROOT /usr/local/go ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH diff --git a/build/image/parser_test b/build/image/parser_test index dd4218a4a8f59..42e4f9d3d2967 100644 --- a/build/image/parser_test +++ b/build/image/parser_test @@ -14,7 +14,7 @@ FROM rockylinux:9 -ENV GOLANG_VERSION 1.23.6 +ENV GOLANG_VERSION 1.25.5 ENV ARCH amd64 ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-$ARCH.tar.gz ENV GOPATH /home/prow/go diff --git a/dumpling/README.md b/dumpling/README.md index 389259ab9b733..9ad75688e79a0 100644 --- a/dumpling/README.md +++ b/dumpling/README.md @@ -28,8 +28,7 @@ Any questions? Let's discuss on [TiDB Internals forum](https://internals.tidb.io Building -------- -0. Under directory `tidb` -1. Install Go 1.23.6 or above +1. Under directory `tidb` 2. Run `make build_dumpling` to compile. The output is in `bin/dumpling`. 3. Run `make dumpling_unit_test` to run the unit tests. 4. Run `make dumpling_integration_test` to run integration tests. For integration test: diff --git a/go.mod b/go.mod index 32a2d47490f04..fdf75a44da480 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/pingcap/tidb -go 1.23.6 +go 1.25.5 require ( cloud.google.com/go/kms v1.15.8 @@ -8,7 +8,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.6.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 - github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c + github.com/BurntSushi/toml v1.5.0 github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/Masterminds/semver v1.5.0 github.com/YangKeao/go-mysql-driver v0.0.0-20240627104025-dd5589458cfa @@ -72,7 +72,7 @@ require ( github.com/joho/sqltocsv v0.0.0-20210428211105-a6d6801d59df github.com/karamaru-alpha/copyloopvar v1.1.0 github.com/kisielk/errcheck v1.7.0 - github.com/klauspost/compress v1.17.11 + github.com/klauspost/compress v1.18.0 github.com/ks3sdklib/aws-sdk-go v1.2.9 github.com/lestrrat-go/jwx/v2 v2.0.21 github.com/mgechev/revive v1.4.0 @@ -92,13 +92,13 @@ require ( github.com/pingcap/sysutil v1.0.1-0.20240311050922-ae81ee01f3a5 github.com/pingcap/tidb/pkg/parser v0.0.0-20211011031125-9b13dc409c5e github.com/pingcap/tipb v0.0.0-20251125085256-097db0b2c02a - github.com/prometheus/client_golang v1.20.5 - github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.57.0 + github.com/prometheus/client_golang v1.23.0 + github.com/prometheus/client_model v0.6.2 + github.com/prometheus/common v0.65.0 github.com/prometheus/prometheus v0.50.1 github.com/qri-io/jsonschema v0.2.1 github.com/robfig/cron/v3 v3.0.1 - github.com/sasha-s/go-deadlock v0.3.5 + github.com/sasha-s/go-deadlock v0.3.6 github.com/shirou/gopsutil/v3 v3.24.5 github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 github.com/soheilhy/cmux v0.1.5 @@ -130,14 +130,14 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 - golang.org/x/net v0.42.0 - golang.org/x/oauth2 v0.27.0 - golang.org/x/sync v0.16.0 - golang.org/x/sys v0.35.0 - golang.org/x/term v0.34.0 - golang.org/x/text v0.28.0 - golang.org/x/time v0.7.0 - golang.org/x/tools v0.35.0 + golang.org/x/net v0.47.0 + golang.org/x/oauth2 v0.33.0 + golang.org/x/sync v0.18.0 + golang.org/x/sys v0.38.0 + golang.org/x/term v0.37.0 + golang.org/x/text v0.31.0 + golang.org/x/time v0.14.0 + golang.org/x/tools v0.39.0 google.golang.org/api v0.170.0 google.golang.org/grpc v1.63.2 gopkg.in/yaml.v2 v2.4.0 @@ -157,7 +157,6 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect - github.com/google/go-cmp v0.7.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/klauspost/asmfmt v1.3.2 // indirect @@ -168,8 +167,10 @@ require ( github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/qri-io/jsonpointer v0.1.1 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect + golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect golang.org/x/tools/go/expect v0.1.1-deprecated // indirect golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect + golang.org/x/tools/godoc v0.1.0-deprecated // indirect ) require ( @@ -182,7 +183,7 @@ require ( github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.3.1 // indirect github.com/Masterminds/sprig/v3 v3.2.2 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect @@ -258,21 +259,21 @@ require ( github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect github.com/ncw/directio v1.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 github.com/pkg/xattr v0.4.9 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect - github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/procfs v0.19.2 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shoenig/go-m1cpu v0.1.7 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c // indirect github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd // indirect @@ -280,8 +281,8 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tklauser/go-sysconf v0.3.15 // indirect + github.com/tklauser/numcpus v0.10.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect @@ -299,14 +300,14 @@ require ( go.opentelemetry.io/otel/sdk v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect - golang.org/x/crypto v0.41.0 // indirect + golang.org/x/crypto v0.44.0 // indirect golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect - golang.org/x/mod v0.27.0 // indirect + golang.org/x/mod v0.30.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250425173222-7b384671a197 // indirect - google.golang.org/protobuf v1.36.6 + google.golang.org/protobuf v1.36.10 gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index b3e9b801ef12f..c319073de78f7 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzS github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= -github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -72,8 +72,8 @@ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy86 github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= +github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= @@ -486,8 +486,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= -github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= @@ -591,8 +591,8 @@ github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT9 github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= -github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe h1:vHpqOnPlnkba8iSxU4j/CvDSS9J4+F4473esQsYLGoE= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= @@ -639,20 +639,20 @@ github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:Om github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= -github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= +github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.57.0 h1:Ro/rKjwdq9mZn1K5QPctzh+MA4Lp0BuYk5ZZEVhoNcY= -github.com/prometheus/common v0.57.0/go.mod h1:7uRPFSUTbfZWsJ7MHY56sqt7hLQu3bxXHDnNhl8E9qI= +github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= +github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/prometheus/prometheus v0.50.1 h1:N2L+DYrxqPh4WZStU+o1p/gQlBaqFbcLBTjlp3vpdXw= github.com/prometheus/prometheus v0.50.1/go.mod h1:FvE8dtQ1Ww63IlyKBn1V4s+zMwF9kHkVNkQBR1pM4CU= github.com/qri-io/jsonpointer v0.1.1 h1:prVZBZLL6TW5vsSB9fFHFAMBLI4b0ri5vribQlTJiBA= @@ -676,8 +676,8 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 h1:GHRpF1pTW19a8tTFrMLUcfWwyC0pnifVo2ClaLq+hP8= github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= -github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= -github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= +github.com/sasha-s/go-deadlock v0.3.6 h1:TR7sfOnZ7x00tWPfD397Peodt57KzMDo+9Ae9rMiUmw= +github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGTqSR+rky/UXo= github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -688,10 +688,10 @@ github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500/go.mod h1:+n github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shoenig/go-m1cpu v0.1.7 h1:C76Yd0ObKR82W4vhfjZiCp0HxcSZ8Nqd84v+HZ0qyI0= +github.com/shoenig/go-m1cpu v0.1.7/go.mod h1:KkDOw6m3ZJQAPHbrzkZki4hnx+pDRR1Lo+ldA56wD5w= +github.com/shoenig/test v1.7.0 h1:eWcHtTXa6QLnBvm0jgEabMRN/uJ4DMV3M8xUGgRkZmk= +github.com/shoenig/test v1.7.0/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs= @@ -767,11 +767,11 @@ github.com/tikv/pd/client v0.0.0-20250901062501-1646b924d286/go.mod h1:kuIEDRLck github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a h1:A6uKudFIfAEpoPdaal3aSqGxBzLyU8TqyXImLwo6dIo= github.com/timakin/bodyclose v0.0.0-20240125160201-f835fa56326a/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= +github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= +github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= @@ -894,8 +894,8 @@ golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4= -golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc= +golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= +golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -940,8 +940,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -988,16 +988,16 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= -golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= +golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo= +golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1012,8 +1012,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= -golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1073,11 +1073,12 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= -golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 h1:E2/AqCUMZGgd73TQkxUMcMla25GB9i/5HOdLr+uH7Vo= +golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1087,8 +1088,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4= -golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw= +golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= +golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1101,14 +1102,14 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= -golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1170,12 +1171,14 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= -golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= -golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= +golang.org/x/tools/godoc v0.1.0-deprecated h1:o+aZ1BOj6Hsx/GBdJO/s815sqftjSnrZZwyYTHODvtk= +golang.org/x/tools/godoc v0.1.0-deprecated/go.mod h1:qM63CriJ961IHWmnWa9CjZnBndniPt4a3CK0PVB9bIg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1283,8 +1286,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/pkg/executor/BUILD.bazel b/pkg/executor/BUILD.bazel index cad49943dd374..c4620c677e7a4 100644 --- a/pkg/executor/BUILD.bazel +++ b/pkg/executor/BUILD.bazel @@ -486,7 +486,6 @@ go_test( "//pkg/util/topsql/state", "@com_github_docker_go_units//:go-units", "@com_github_gorilla_mux//:mux", - "@com_github_hashicorp_go_version//:go-version", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_fn//:fn", diff --git a/pkg/executor/aggfuncs/aggfuncs.go b/pkg/executor/aggfuncs/aggfuncs.go index 0f46bcf1dbf5e..07d36a1b9732d 100644 --- a/pkg/executor/aggfuncs/aggfuncs.go +++ b/pkg/executor/aggfuncs/aggfuncs.go @@ -21,6 +21,7 @@ import ( "github.com/pingcap/tidb/pkg/expression/exprctx" "github.com/pingcap/tidb/pkg/types" "github.com/pingcap/tidb/pkg/util/chunk" + "github.com/pingcap/tidb/pkg/util/hack" ) // All the AggFunc implementations are listed here for navigation. @@ -144,7 +145,17 @@ const ( type PartialResult unsafe.Pointer // AggPartialResultMapper contains aggregate function results -type AggPartialResultMapper map[string][]PartialResult +type AggPartialResultMapper = *hack.MemAwareMap[string, []PartialResult] + +// NewAggPartialResultMapper creates a new AggPartialResultMapper +func NewAggPartialResultMapper() AggPartialResultMapper { + return NewAggPartialResultMapperWithCap(0) +} + +// NewAggPartialResultMapperWithCap creates a new AggPartialResultMapper with specified capacity +func NewAggPartialResultMapperWithCap(capacity int) AggPartialResultMapper { + return hack.NewMemAwareMap[string, []PartialResult](capacity) +} type serializer interface { // SerializePartialResult will serialize meta data of aggregate function into bytes and put them into chunk. diff --git a/pkg/executor/aggfuncs/func_json_objectagg.go b/pkg/executor/aggfuncs/func_json_objectagg.go index 9e2f23a0c7f45..8bf80f3dc4d90 100644 --- a/pkg/executor/aggfuncs/func_json_objectagg.go +++ b/pkg/executor/aggfuncs/func_json_objectagg.go @@ -36,31 +36,28 @@ type jsonObjectAgg struct { } type partialResult4JsonObjectAgg struct { - entries map[string]any - bInMap int // indicate there are 2^bInMap buckets in entries. + entries hack.MemAwareMap[string, any] } func (*jsonObjectAgg) AllocPartialResult() (pr PartialResult, memDelta int64) { p := partialResult4JsonObjectAgg{} - p.entries = make(map[string]any) - p.bInMap = 0 - return PartialResult(&p), DefPartialResult4JsonObjectAgg + (1< (1< (1< (1< 0 { + if _, ok := e.groupSet.M[groupKey]; !ok { + if atomic.LoadUint32(&e.inSpillMode) == 1 && len(e.groupSet.M) > 0 { sel = append(sel, j) continue } @@ -846,7 +838,7 @@ func (e *HashAggExec) getNextChunk(ctx context.Context) (err error) { } func (e *HashAggExec) getPartialResults(groupKey string) []aggfuncs.PartialResult { - partialResults, ok := e.partialResultMap[groupKey] + partialResults, ok := e.partialResultMap.M[groupKey] allMemDelta := int64(0) if !ok { partialResults = make([]aggfuncs.PartialResult, 0, len(e.PartialAggFuncs)) @@ -855,13 +847,11 @@ func (e *HashAggExec) getPartialResults(groupKey string) []aggfuncs.PartialResul partialResults = append(partialResults, partialResult) allMemDelta += memDelta } - // Map will expand when count > bucketNum * loadFactor. The memory usage will doubled. - if len(e.partialResultMap)+1 > (1< 0 { + e.memTracker.Consume(deltaBytes) + } } failpoint.Inject("ConsumeRandomPanic", nil) e.memTracker.Consume(allMemDelta) diff --git a/pkg/executor/aggregate/agg_hash_final_worker.go b/pkg/executor/aggregate/agg_hash_final_worker.go index 5f30781b66b08..006ceab9ad75e 100644 --- a/pkg/executor/aggregate/agg_hash_final_worker.go +++ b/pkg/executor/aggregate/agg_hash_final_worker.go @@ -24,7 +24,6 @@ import ( "github.com/pingcap/tidb/pkg/executor/aggfuncs" "github.com/pingcap/tidb/pkg/sessionctx" "github.com/pingcap/tidb/pkg/util/chunk" - "github.com/pingcap/tidb/pkg/util/hack" "github.com/pingcap/tidb/pkg/util/logutil" "go.uber.org/zap" ) @@ -42,8 +41,7 @@ type HashAggFinalWorker struct { baseHashAggWorker partialResultMap aggfuncs.AggPartialResultMapper - BInMap int - inputCh chan *aggfuncs.AggPartialResultMapper + inputCh chan aggfuncs.AggPartialResultMapper outputCh chan *AfFinalResult finalResultHolderCh chan *chunk.Chunk @@ -58,7 +56,7 @@ func (w *HashAggFinalWorker) getInputFromDisk(sctx sessionctx.Context) (ret aggf return ret, restoredMem, err } -func (w *HashAggFinalWorker) getPartialInput() (input *aggfuncs.AggPartialResultMapper, ok bool) { +func (w *HashAggFinalWorker) getPartialInput() (input aggfuncs.AggPartialResultMapper, ok bool) { waitStart := time.Now() defer updateWaitTime(w.stats, waitStart) select { @@ -72,30 +70,23 @@ func (w *HashAggFinalWorker) getPartialInput() (input *aggfuncs.AggPartialResult return } -func (w *HashAggFinalWorker) initBInMap() { - w.BInMap = 0 - mapLen := len(w.partialResultMap) - for mapLen > (1< 0 { + w.memTracker.Consume(deltaBytes) + } continue } @@ -112,14 +103,6 @@ func (w *HashAggFinalWorker) mergeInputIntoResultMap(sctx sessionctx.Context, in return nil } -func (w *HashAggFinalWorker) handleNewGroupKey(key string, value []aggfuncs.PartialResult) { - if len(w.partialResultMap)+1 > (1< bucketNum * loadFactor. The memory usage will double. - if len(mapper[finalWorkerIdx])+1 > (1< 0 { + w.partialResultsMapMem.Add(delta) + w.memTracker.Consume(delta) + } } w.partialResultsMapMem.Add(allMemDelta) w.memTracker.Consume(allMemDelta) @@ -291,8 +285,8 @@ func (w *HashAggPartialWorker) updatePartialResult(ctx sessionctx.Context, chk * } func (w *HashAggPartialWorker) shuffleIntermData(finalConcurrency int) { - for i := 0; i < finalConcurrency; i++ { - w.outputChs[i] <- &w.partialResultsMap[i] + for i := range finalConcurrency { + w.outputChs[i] <- w.partialResultsMap[i] } } @@ -332,19 +326,16 @@ func (w *HashAggPartialWorker) spillDataToDiskImpl() error { // Clear the partialResultsMap w.partialResultsMap = make([]aggfuncs.AggPartialResultMapper, len(w.partialResultsMap)) for i := range w.partialResultsMap { - w.partialResultsMap[i] = make(aggfuncs.AggPartialResultMapper) + w.partialResultsMap[i] = aggfuncs.NewAggPartialResultMapper() } w.memTracker.Consume(-w.partialResultsMapMem.Load()) w.partialResultsMapMem.Store(0) - for i := range w.BInMaps { - w.BInMaps[i] = 0 - } }() w.prepareForSpill() for _, partialResultsMap := range w.partialResultsMap { - for key, partialResults := range partialResultsMap { + for key, partialResults := range partialResultsMap.M { partitionNum := int(murmur3.Sum32(hack.Slice(key))) % spilledPartitionNum // Spill data when tmp chunk is full diff --git a/pkg/executor/aggregate/agg_spill.go b/pkg/executor/aggregate/agg_spill.go index dc281420d602c..b3a007017c387 100644 --- a/pkg/executor/aggregate/agg_spill.go +++ b/pkg/executor/aggregate/agg_spill.go @@ -24,7 +24,6 @@ import ( "github.com/pingcap/tidb/pkg/types" "github.com/pingcap/tidb/pkg/util/chunk" "github.com/pingcap/tidb/pkg/util/disk" - "github.com/pingcap/tidb/pkg/util/hack" "github.com/pingcap/tidb/pkg/util/logutil" "github.com/pingcap/tidb/pkg/util/memory" "go.uber.org/zap" @@ -221,10 +220,8 @@ func (p *parallelHashAggSpillHelper) setError() { } func (p *parallelHashAggSpillHelper) restoreOnePartition(ctx sessionctx.Context) (aggfuncs.AggPartialResultMapper, int64, error) { - restoredData := make(aggfuncs.AggPartialResultMapper) - bInMap := 0 + restoredData := aggfuncs.NewAggPartialResultMapper() restoredMem := int64(0) - restoredPartitionIdx, isSuccess := p.getNextPartition() if !isSuccess { return nil, restoredMem, nil @@ -232,7 +229,7 @@ func (p *parallelHashAggSpillHelper) restoreOnePartition(ctx sessionctx.Context) spilledFilesIO := p.getListInDisks(restoredPartitionIdx) for _, spilledFile := range spilledFilesIO { - memDelta, expandMem, err := p.restoreFromOneSpillFile(ctx, &restoredData, spilledFile, &bInMap) + memDelta, expandMem, err := p.restoreFromOneSpillFile(ctx, restoredData, spilledFile) if err != nil { return nil, restoredMem, err } @@ -249,12 +246,11 @@ type processRowContext struct { rowPos int keyColPos int aggFuncNum int - restoreadData *aggfuncs.AggPartialResultMapper + restoreadData aggfuncs.AggPartialResultMapper partialResultsRestored [][]aggfuncs.PartialResult - bInMap *int } -func (p *parallelHashAggSpillHelper) restoreFromOneSpillFile(ctx sessionctx.Context, restoreadData *aggfuncs.AggPartialResultMapper, diskIO *chunk.DataInDiskByChunks, bInMap *int) (totalMemDelta int64, totalExpandMem int64, err error) { +func (p *parallelHashAggSpillHelper) restoreFromOneSpillFile(ctx sessionctx.Context, restoreadData aggfuncs.AggPartialResultMapper, diskIO *chunk.DataInDiskByChunks) (totalMemDelta int64, totalExpandMem int64, err error) { chunkNum := diskIO.NumChunks() aggFuncNum := len(p.aggFuncsForRestoring) processRowContext := &processRowContext{ @@ -265,7 +261,6 @@ func (p *parallelHashAggSpillHelper) restoreFromOneSpillFile(ctx sessionctx.Cont aggFuncNum: aggFuncNum, restoreadData: restoreadData, partialResultsRestored: make([][]aggfuncs.PartialResult, aggFuncNum), - bInMap: bInMap, } for i := 0; i < chunkNum; i++ { chunk, err := diskIO.GetChunk(i) @@ -298,7 +293,7 @@ func (p *parallelHashAggSpillHelper) restoreFromOneSpillFile(ctx sessionctx.Cont func (p *parallelHashAggSpillHelper) processRow(context *processRowContext) (totalMemDelta int64, expandMem int64, err error) { key := context.chunk.GetRow(context.rowPos).GetString(context.keyColPos) - prs, ok := (*context.restoreadData)[key] + prs, ok := context.restoreadData.M[key] if ok { exprCtx := context.ctx.GetExprCtx() // The key has appeared before, merge results. @@ -311,17 +306,12 @@ func (p *parallelHashAggSpillHelper) processRow(context *processRowContext) (tot } } else { totalMemDelta += int64(len(key)) - - if len(*context.restoreadData)+1 > (1<<*context.bInMap)*hack.LoadFactorNum/hack.LoadFactorDen { - expandMem = hack.DefBucketMemoryUsageForMapStrToSlice * (1 << *context.bInMap) - p.memTracker.Consume(expandMem) - (*context.bInMap)++ - } - results := make([]aggfuncs.PartialResult, context.aggFuncNum) - (*context.restoreadData)[key] = results - - for aggPos := 0; aggPos < context.aggFuncNum; aggPos++ { + delta := context.restoreadData.Set(key, results) + if delta > 0 { + p.memTracker.Consume(delta) + } + for aggPos := range context.aggFuncNum { results[aggPos] = context.partialResultsRestored[aggPos][context.rowPos] } } diff --git a/pkg/executor/benchmark_test.go b/pkg/executor/benchmark_test.go index 0476d877aad27..c8f3a2b51114c 100644 --- a/pkg/executor/benchmark_test.go +++ b/pkg/executor/benchmark_test.go @@ -1922,10 +1922,10 @@ func BenchmarkAggPartialResultMapperMemoryUsage(b *testing.B) { b.Run(fmt.Sprintf("MapRows %v", c.rowNum), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - aggMap := make(aggfuncs.AggPartialResultMapper) + aggMap := aggfuncs.NewAggPartialResultMapper() tempSlice := make([]aggfuncs.PartialResult, 10) - for num := 0; num < c.rowNum; num++ { - aggMap[strconv.Itoa(num)] = tempSlice + for num := range c.rowNum { + aggMap.Set(strconv.Itoa(num), tempSlice) } } }) diff --git a/pkg/executor/executor_pkg_test.go b/pkg/executor/executor_pkg_test.go index f2b095eb96dd4..ea0a573fdc6f6 100644 --- a/pkg/executor/executor_pkg_test.go +++ b/pkg/executor/executor_pkg_test.go @@ -16,17 +16,11 @@ package executor import ( "fmt" - "runtime" - "strconv" - "strings" "testing" "time" - "unsafe" - "github.com/hashicorp/go-version" "github.com/pingcap/tidb/pkg/domain" "github.com/pingcap/tidb/pkg/errctx" - "github.com/pingcap/tidb/pkg/executor/aggfuncs" "github.com/pingcap/tidb/pkg/executor/join" "github.com/pingcap/tidb/pkg/kv" "github.com/pingcap/tidb/pkg/parser/ast" @@ -165,158 +159,6 @@ func TestSlowQueryRuntimeStats(t *testing.T) { require.Equal(t, "initialize: 2ms, read_file: 2s, parse_log: {time:200ms, concurrency:15}, total_file: 4, read_file: 4, read_size: 2 GB", stats.String()) } -// Test whether the actual buckets in Golang Map is same with the estimated number. -// The test relies on the implement of Golang Map. ref https://github.com/golang/go/blob/go1.13/src/runtime/map.go#L114 -func TestAggPartialResultMapperB(t *testing.T) { - // skip err, since we guarantee the success of execution - go113, _ := version.NewVersion(`1.13`) - // go version format is `gox.y.z foobar`, we only need x.y.z part - // The following is pretty hacky, but it only in test which is ok to do so. - actualVer, err := version.NewVersion(runtime.Version()[2:6]) - if err != nil { - t.Fatalf("Cannot get actual go version with error %v\n", err) - } - if actualVer.LessThan(go113) { - t.Fatalf("Unsupported version and should never use any version less than go1.13\n") - } - type testCase struct { - rowNum int - expectedB int - expectedGrowing bool - } - var cases []testCase - // https://github.com/golang/go/issues/63438 - // in 1.21, the load factor of map is 6 rather than 6.5 and the go team refused to backport to 1.21. - // https://github.com/golang/go/issues/65706 - // in 1.23, it has problem. - if strings.Contains(runtime.Version(), `go1.21`) { - cases = []testCase{ - { - rowNum: 0, - expectedB: 0, - expectedGrowing: false, - }, - { - rowNum: 95, - expectedB: 4, - expectedGrowing: false, - }, - { - rowNum: 10000, // 6 * (1 << 11) is 12288 - expectedB: 11, - expectedGrowing: false, - }, - { - rowNum: 1000000, // 6 * (1 << 18) is 1572864 - expectedB: 18, - expectedGrowing: false, - }, - { - rowNum: 786432, // 6 * (1 << 17) - expectedB: 17, - expectedGrowing: false, - }, - { - rowNum: 786433, // 6 * (1 << 17) + 1 - expectedB: 18, - expectedGrowing: true, - }, - { - rowNum: 393216, // 6 * (1 << 16) - expectedB: 16, - expectedGrowing: false, - }, - { - rowNum: 393217, // 6 * (1 << 16) + 1 - expectedB: 17, - expectedGrowing: true, - }, - } - } else { - cases = []testCase{ - { - rowNum: 0, - expectedB: 0, - expectedGrowing: false, - }, - { - rowNum: 100, - expectedB: 4, - expectedGrowing: false, - }, - { - rowNum: 10000, - expectedB: 11, - expectedGrowing: false, - }, - { - rowNum: 1000000, - expectedB: 18, - expectedGrowing: false, - }, - { - rowNum: 851968, // 6.5 * (1 << 17) - expectedB: 17, - expectedGrowing: false, - }, - { - rowNum: 851969, // 6.5 * (1 << 17) + 1 - expectedB: 18, - expectedGrowing: true, - }, - { - rowNum: 425984, // 6.5 * (1 << 16) - expectedB: 16, - expectedGrowing: false, - }, - { - rowNum: 425985, // 6.5 * (1 << 16) + 1 - expectedB: 17, - expectedGrowing: true, - }, - } - } - - for _, tc := range cases { - aggMap := make(aggfuncs.AggPartialResultMapper) - tempSlice := make([]aggfuncs.PartialResult, 10) - for num := 0; num < tc.rowNum; num++ { - aggMap[strconv.Itoa(num)] = tempSlice - } - - require.Equal(t, tc.expectedB, getB(aggMap)) - require.Equal(t, tc.expectedGrowing, getGrowing(aggMap)) - } -} - -// A header for a Go map. -// nolint:structcheck -type hmap struct { - // Note: the format of the hmap is also encoded in cmd/compile/internal/gc/reflect.go. - // Make sure this stays in sync with the compiler's definition. - count int // nolint:unused // # live cells == size of map. Must be first (used by len() builtin) - flags uint8 // nolint:unused - B uint8 // nolint:unused // log_2 of # of buckets (can hold up to loadFactor * 2^B items) - noverflow uint16 // nolint:unused // approximate number of overflow buckets; see incrnoverflow for details - hash0 uint32 // nolint:unused // hash seed - - buckets unsafe.Pointer // nolint:unused // array of 2^B Buckets. may be nil if count==0. - oldbuckets unsafe.Pointer // nolint:unused // previous bucket array of half the size, non-nil only when growing - nevacuate uintptr // nolint:unused // progress counter for evacuation (buckets less than this have been evacuated) -} - -func getB(m aggfuncs.AggPartialResultMapper) int { - point := (**hmap)(unsafe.Pointer(&m)) - value := *point - return int(value.B) -} - -func getGrowing(m aggfuncs.AggPartialResultMapper) bool { - point := (**hmap)(unsafe.Pointer(&m)) - value := *point - return value.oldbuckets != nil -} - func TestFilterTemporaryTableKeys(t *testing.T) { vars := variable.NewSessionVars(nil) const tableID int64 = 3 diff --git a/pkg/executor/index_merge_reader.go b/pkg/executor/index_merge_reader.go index 57d2d4c0bce9a..da546ea33e6c1 100644 --- a/pkg/executor/index_merge_reader.go +++ b/pkg/executor/index_merge_reader.go @@ -780,7 +780,7 @@ func (e *IndexMergeReaderExecutor) startIndexMergeTableScanWorker(ctx context.Co } ctx1, cancel := context.WithCancel(ctx) go func() { - defer trace.StartRegion(ctx, "IndexMergeTableScanWorker").End() + defer trace.StartRegion(ctx, tableScanWorkerType).End() var task *indexMergeTableTask util.WithRecovery( // Note we use the address of `task` as the argument of both `pickAndExecTask` and `handleTableScanWorkerPanic` diff --git a/pkg/executor/join/BUILD.bazel b/pkg/executor/join/BUILD.bazel index fc03251c9a745..b17eda9b257ac 100644 --- a/pkg/executor/join/BUILD.bazel +++ b/pkg/executor/join/BUILD.bazel @@ -114,7 +114,6 @@ go_test( "//pkg/util/chunk", "//pkg/util/codec", "//pkg/util/disk", - "//pkg/util/hack", "//pkg/util/memory", "//pkg/util/mock", "//pkg/util/sqlkiller", diff --git a/pkg/executor/join/concurrent_map.go b/pkg/executor/join/concurrent_map.go index 0c7d74a287b05..d38246f30481b 100644 --- a/pkg/executor/join/concurrent_map.go +++ b/pkg/executor/join/concurrent_map.go @@ -20,7 +20,7 @@ import ( ) // ShardCount controls the shard maps within the concurrent map -var ShardCount = 320 +const ShardCount = 320 // A "thread" safe map of type string:Anything. // To avoid lock bottlenecks this map is dived to several (ShardCount) map shards. @@ -28,16 +28,16 @@ type concurrentMap []*concurrentMapShared // A "thread" safe string to anything map. type concurrentMapShared struct { - items map[uint64]*entry - syncutil.RWMutex // Read Write mutex, guards access to internal map. - bInMap int64 // indicate there are 2^bInMap buckets in items + items hack.MemAwareMap[uint64, *entry] + syncutil.RWMutex // Read Write mutex, guards access to internal map. } // newConcurrentMap creates a new concurrent map. func newConcurrentMap() concurrentMap { m := make(concurrentMap, ShardCount) - for i := 0; i < ShardCount; i++ { - m[i] = &concurrentMapShared{items: make(map[uint64]*entry), bInMap: 0} + for i := range ShardCount { + m[i] = &concurrentMapShared{} + m[i].items.Init(make(map[uint64]*entry)) } return m } @@ -51,34 +51,13 @@ func (m concurrentMap) getShard(hashKey uint64) *concurrentMapShared { func (m concurrentMap) Insert(key uint64, value *entry) (memDelta int64) { shard := m.getShard(key) shard.Lock() - oldValue := shard.items[key] + oldValue := shard.items.M[key] value.Next = oldValue - shard.items[key] = value - if len(shard.items) > (1< (1<= 1 and b = 2 and c = 3 and d = 4") - statsTbl, ok = h.Get(tblInfo.ID) - require.True(t, ok) + require.Eventually(t, func() bool { + statsTbl, ok = h.Get(tblInfo.ID) + require.True(t, ok) + return statsTbl.ColNum() == 3 + }, 5*time.Second, 100*time.Millisecond) require.True(t, statsTbl.GetCol(tblInfo.Columns[0].ID).IsFullLoad()) require.True(t, statsTbl.GetCol(tblInfo.Columns[1].ID).IsFullLoad()) require.True(t, statsTbl.GetCol(tblInfo.Columns[3].ID).IsFullLoad()) @@ -465,8 +468,11 @@ func TestSyncLoadOnObjectWhichCanNotFoundInStorage(t *testing.T) { tk.MustExec("analyze table t columns a, b, c") require.NoError(t, h.InitStatsLite(context.TODO())) tk.MustExec("select * from t where a >= 1 and b = 2 and c = 3 and d = 4") - statsTbl, ok = h.Get(tblInfo.ID) - require.True(t, ok) + require.Eventually(t, func() bool { + statsTbl, ok = h.Get(tblInfo.ID) + require.True(t, ok) + return statsTbl.ColNum() == 4 + }, 5*time.Second, 100*time.Millisecond) // a, b, d's status is not changed. require.True(t, statsTbl.GetCol(tblInfo.Columns[0].ID).IsFullLoad()) require.True(t, statsTbl.GetCol(tblInfo.Columns[1].ID).IsFullLoad()) diff --git a/pkg/testkit/testdata/testdata.go b/pkg/testkit/testdata/testdata.go index 4453e257b930b..ed70e80c9f1ac 100644 --- a/pkg/testkit/testdata/testdata.go +++ b/pkg/testkit/testdata/testdata.go @@ -13,7 +13,6 @@ // limitations under the License. //go:build !codes -// +build !codes package testdata diff --git a/pkg/util/cgroup/BUILD.bazel b/pkg/util/cgroup/BUILD.bazel index 11b5c8abb7082..b094eddbdea0e 100644 --- a/pkg/util/cgroup/BUILD.bazel +++ b/pkg/util/cgroup/BUILD.bazel @@ -49,9 +49,15 @@ go_library( "@io_bazel_rules_go//go/platform:openbsd": [ "@com_github_pingcap_failpoint//:failpoint", ], + "@io_bazel_rules_go//go/platform:osx": [ + "@com_github_pingcap_failpoint//:failpoint", + ], "@io_bazel_rules_go//go/platform:plan9": [ "@com_github_pingcap_failpoint//:failpoint", ], + "@io_bazel_rules_go//go/platform:qnx": [ + "@com_github_pingcap_failpoint//:failpoint", + ], "@io_bazel_rules_go//go/platform:solaris": [ "@com_github_pingcap_failpoint//:failpoint", ], diff --git a/pkg/util/hack/BUILD.bazel b/pkg/util/hack/BUILD.bazel index 9a21b47867c2c..bbd6caefd3dd4 100644 --- a/pkg/util/hack/BUILD.bazel +++ b/pkg/util/hack/BUILD.bazel @@ -2,7 +2,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "hack", - srcs = ["hack.go"], + srcs = [ + "hack.go", + "map_abi.go", + ], importpath = "github.com/pingcap/tidb/pkg/util/hack", visibility = ["//visibility:public"], ) @@ -13,11 +16,13 @@ go_test( srcs = [ "hack_test.go", "main_test.go", + "map_abi_test.go", ], embed = [":hack"], flaky = True, deps = [ "//pkg/testkit/testsetup", + "@com_github_stretchr_testify//require", "@org_uber_go_goleak//:goleak", ], ) diff --git a/pkg/util/hack/hack.go b/pkg/util/hack/hack.go index 34a01ae6360cf..de5ec8a30bcf9 100644 --- a/pkg/util/hack/hack.go +++ b/pkg/util/hack/hack.go @@ -15,8 +15,6 @@ package hack import ( - "runtime" - "strings" "unsafe" ) @@ -39,52 +37,19 @@ func Slice(s string) []byte { return unsafe.Slice(unsafe.StringData(s), len(s)) } -// LoadFactor is the maximum average load of a bucket that triggers growth is 6.5 in Golang Map. -// Represent as LoadFactorNum/LoadFactorDen, to allow integer math. -// They are from the golang definition. ref: https://github.com/golang/go/blob/go1.13.15/src/runtime/map.go#L68-L71 -const ( - // LoadFactorDen is the denominator of load factor - LoadFactorDen = 2 -) - -// LoadFactorNum is the numerator of load factor -var LoadFactorNum = 13 - func init() { - // In go1.21, the load factor num becomes 12 and go team has decided not to backport the fix to 1.21. - // See more details in https://github.com/golang/go/issues/63438 - if strings.Contains(runtime.Version(), `go1.21`) || strings.Contains(runtime.Version(), `go1.22`) { - LoadFactorNum = 12 - } -} - -const ( - // DefBucketMemoryUsageForMapStrToSlice = bucketSize*(1+unsafe.Sizeof(string) + unsafe.Sizeof(slice))+2*ptrSize - // ref https://github.com/golang/go/blob/go1.15.6/src/reflect/type.go#L2162. - // The bucket size may be changed by golang implement in the future. - // Golang Map needs to acquire double the memory when expanding, - // and the old buckets will be released after the data is migrated. - // Considering the worst case, the data in the old bucket cannot be migrated in time, and the old bucket cannot - // be GCed, we expand the bucket size to 1.5 times to estimate the memory usage of Golang Map. - DefBucketMemoryUsageForMapStrToSlice = (8*(1+16+24) + 16) / 2 * 3 - // DefBucketMemoryUsageForMapIntToPtr = bucketSize*(1+unsafe.Sizeof(uint64) + unsafe.Sizeof(pointer))+2*ptrSize - DefBucketMemoryUsageForMapIntToPtr = (8*(1+8+8) + 16) / 2 * 3 - // DefBucketMemoryUsageForMapStringToAny = bucketSize*(1+unsafe.Sizeof(string) + unsafe.Sizeof(interface{}))+2*ptrSize - DefBucketMemoryUsageForMapStringToAny = (8*(1+16+16) + 16) / 2 * 3 - // DefBucketMemoryUsageForSetString = bucketSize*(1+unsafe.Sizeof(string) + unsafe.Sizeof(struct{}))+2*ptrSize - DefBucketMemoryUsageForSetString = (8*(1+16+0) + 16) / 2 * 3 - // DefBucketMemoryUsageForSetFloat64 = bucketSize*(1+unsafe.Sizeof(float64) + unsafe.Sizeof(struct{}))+2*ptrSize - DefBucketMemoryUsageForSetFloat64 = (8*(1+8+0) + 16) / 2 * 3 - // DefBucketMemoryUsageForSetInt64 = bucketSize*(1+unsafe.Sizeof(int64) + unsafe.Sizeof(struct{}))+2*ptrSize - DefBucketMemoryUsageForSetInt64 = (8*(1+8+0) + 16) / 2 * 3 -) - -// EstimateBucketMemoryUsage returns the estimated memory usage of a bucket in a map. -func EstimateBucketMemoryUsage[K comparable, V any]() uint64 { - return (8*(1+uint64(unsafe.Sizeof(*new(K))+unsafe.Sizeof(*new(V)))) + 16) / 2 * 3 + checkMapABI() } // GetBytesFromPtr return a bytes array from the given ptr and length func GetBytesFromPtr(ptr unsafe.Pointer, length int) []byte { return unsafe.Slice((*byte)(ptr), length) } + +// Memory usage constants for swiss map +const ( + DefBucketMemoryUsageForMapStringToAny = 312 + DefBucketMemoryUsageForSetString = 248 + DefBucketMemoryUsageForSetFloat64 = 184 + DefBucketMemoryUsageForSetInt64 = 184 +) diff --git a/pkg/util/hack/map_abi.go b/pkg/util/hack/map_abi.go new file mode 100644 index 0000000000000..170ce960fd863 --- /dev/null +++ b/pkg/util/hack/map_abi.go @@ -0,0 +1,424 @@ +// Copyright 2025 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package hack + +import ( + "runtime" + "strings" + "unsafe" +) + +// Maximum size of a table before it is split at the directory level. +const maxTableCapacity = 1024 + +// Number of bits in the group.slot count. +const swissMapGroupSlotsBits = 3 + +// Number of slots in a group. +const swissMapGroupSlots = 1 << swissMapGroupSlotsBits // 8 + +// $GOROOT/src/internal/runtime/maps/table.go:`type table struct` +type swissMapTable struct { + // The number of filled slots (i.e. the number of elements in the table). + used uint16 + + // The total number of slots (always 2^N). Equal to + // `(groups.lengthMask+1)*abi.SwissMapGroupSlots`. + capacity uint16 + + // The number of slots we can still fill without needing to rehash. + // + // We rehash when used + tombstones > loadFactor*capacity, including + // tombstones so the table doesn't overfill with tombstones. This field + // counts down remaining empty slots before the next rehash. + growthLeft uint16 + + // The number of bits used by directory lookups above this table. Note + // that this may be less then globalDepth, if the directory has grown + // but this table has not yet been split. + localDepth uint8 + + // Index of this table in the Map directory. This is the index of the + // _first_ location in the directory. The table may occur in multiple + // sequential indicies. + // + // index is -1 if the table is stale (no longer installed in the + // directory). + index int + + // groups is an array of slot groups. Each group holds abi.SwissMapGroupSlots + // key/elem slots and their control bytes. A table has a fixed size + // groups array. The table is replaced (in rehash) when more space is + // required. + // + // TODO(prattmic): keys and elements are interleaved to maximize + // locality, but it comes at the expense of wasted space for some types + // (consider uint8 key, uint64 element). Consider placing all keys + // together in these cases to save space. + groups groupsReference +} + +// groupsReference is a wrapper type describing an array of groups stored at +// data. +type groupsReference struct { + // data points to an array of groups. See groupReference above for the + // definition of group. + data unsafe.Pointer // data *[length]typ.Group + + // lengthMask is the number of groups in data minus one (note that + // length must be a power of two). This allows computing i%length + // quickly using bitwise AND. + lengthMask uint64 +} + +// $GOROOT/src/internal/runtime/maps/map.go:`type Map struct` +type swissMap struct { + // The number of filled slots (i.e. the number of elements in all + // tables). Excludes deleted slots. + // Must be first (known by the compiler, for len() builtin). + Used uint64 + + // seed is the hash seed, computed as a unique random number per map. + seed uintptr + + // The directory of tables. + // + // Normally dirPtr points to an array of table pointers + // + // dirPtr *[dirLen]*table + // + // The length (dirLen) of this array is `1 << globalDepth`. Multiple + // entries may point to the same table. See top-level comment for more + // details. + // + // Small map optimization: if the map always contained + // abi.SwissMapGroupSlots or fewer entries, it fits entirely in a + // single group. In that case dirPtr points directly to a single group. + // + // dirPtr *group + // + // In this case, dirLen is 0. used counts the number of used slots in + // the group. Note that small maps never have deleted slots (as there + // is no probe sequence to maintain). + dirPtr unsafe.Pointer + dirLen int + + // The number of bits to use in table directory lookups. + globalDepth uint8 + + // The number of bits to shift out of the hash for directory lookups. + // On 64-bit systems, this is 64 - globalDepth. + globalShift uint8 + + // writing is a flag that is toggled (XOR 1) while the map is being + // written. Normally it is set to 1 when writing, but if there are + // multiple concurrent writers, then toggling increases the probability + // that both sides will detect the race. + writing uint8 + + // tombstonePossible is false if we know that no table in this map + // contains a tombstone. + tombstonePossible bool + + // clearSeq is a sequence counter of calls to Clear. It is used to + // detect map clears during iteration. + clearSeq uint64 +} + +func (m *swissMap) directoryAt(i uintptr) *swissMapTable { + return *(**swissMapTable)(unsafe.Pointer(uintptr(m.dirPtr) + uintptr(sizeofPtr)*i)) +} + +// Size returns the accurate memory size of the swissMap including all its tables. +func (m *swissMap) Size(groupSize uint64) (sz uint64) { + sz += swissMapSize + sz += sizeofPtr * uint64(m.dirLen) + if m.dirLen == 0 { + sz += groupSize + return + } + + var lastTab *swissMapTable + for i := range m.dirLen { + t := m.directoryAt(uintptr(i)) + if t == lastTab { + continue + } + lastTab = t + sz += swissTableSize + sz += groupSize * (t.groups.lengthMask + 1) + } + return +} + +// Cap returns the total capacity of the swissMap. +func (m *swissMap) Cap() uint64 { + if m.dirLen == 0 { + return swissMapGroupSlots + } + var capacity uint64 + var lastTab *swissMapTable + for i := range m.dirLen { + t := m.directoryAt(uintptr(i)) + if t == lastTab { + continue + } + lastTab = t + capacity += uint64(t.capacity) + } + return capacity +} + +// Size returns the accurate memory size +func (m *SwissMapWrap) Size() uint64 { + return m.Data.Size(uint64(m.Type.GroupSize)) +} + +const ( + swissMapSize = uint64(unsafe.Sizeof(swissMap{})) + swissTableSize = uint64(unsafe.Sizeof(swissMapTable{})) + sizeofPtr = uint64(unsafe.Sizeof(uintptr(0))) +) + +// TODO: use a more accurate size calculation if necessary +func approxSize(groupSize uint64, maxLen uint64) (size uint64) { + // 204 can fit the `split`/`rehash` behavior of different kinds of swisstable + const ratio = 204 + return groupSize * maxLen * ratio / 1000 +} + +type ctrlGroup uint64 + +type groupReference struct { + // data points to the group, which is described by typ.Group and has + // layout: + // + // type group struct { + // ctrls ctrlGroup + // slots [abi.SwissMapGroupSlots]slot + // } + // + // type slot struct { + // key typ.Key + // elem typ.Elem + // } + data unsafe.Pointer // data *typ.Group +} + +func (g *groupsReference) group(typ *swissMapType, i uint64) groupReference { + // TODO(prattmic): Do something here about truncation on cast to + // uintptr on 32-bit systems? + offset := uintptr(i) * typ.GroupSize + + return groupReference{ + data: unsafe.Pointer(uintptr(g.data) + offset), + } +} + +// $GOROOT/src/internal/abi/type.go:`type Type struct` +type abiType struct { + Size uintptr + PtrBytes uintptr // number of (prefix) bytes in the type that can contain pointers + Hash uint32 // hash of type; avoids computation in hash tables + TFlag uint8 // extra type information flags + Align uint8 // alignment of variable with this type + FieldAlign uint8 // alignment of struct field with this type + Kind uint8 // enumeration for C + // function for comparing objects of this type + // (ptr to object A, ptr to object B) -> ==? + Equal func(unsafe.Pointer, unsafe.Pointer) bool + // GCData stores the GC type data for the garbage collector. + // Normally, GCData points to a bitmask that describes the + // ptr/nonptr fields of the type. The bitmask will have at + // least PtrBytes/ptrSize bits. + // If the TFlagGCMaskOnDemand bit is set, GCData is instead a + // **byte and the pointer to the bitmask is one dereference away. + // The runtime will build the bitmask if needed. + // (See runtime/type.go:getGCMask.) + // Note: multiple types may have the same value of GCData, + // including when TFlagGCMaskOnDemand is set. The types will, of course, + // have the same pointer layout (but not necessarily the same size). + GCData *byte + Str int32 // string form + PtrToThis int32 // type for pointer to this type, may be zero +} + +// $GOROOT/src/internal/abi/map_swiss.go:`type SwissMapType struct` +type swissMapType struct { + abiType + Key *abiType + Elem *abiType + Group *abiType // internal type representing a slot group + // function for hashing keys (ptr to key, seed) -> hash + Hasher func(unsafe.Pointer, uintptr) uintptr + GroupSize uintptr // == Group.Size_ + SlotSize uintptr // size of key/elem slot + ElemOff uintptr // offset of elem in key/elem slot; aka key size; elem size: SlotSize - ElemOff; + Flags uint32 +} + +// SwissMapWrap is a wrapper of map to access its internal structure. +type SwissMapWrap struct { + Type *swissMapType + Data *swissMap +} + +// ToSwissMap converts a map to SwissMapWrap. +func ToSwissMap[K comparable, V any](m map[K]V) (sm SwissMapWrap) { + ref := any(m) + sm = *(*SwissMapWrap)(unsafe.Pointer(&ref)) + return +} + +const ( + ctrlGroupsSize = unsafe.Sizeof(ctrlGroup(0)) + groupSlotsOffset = ctrlGroupsSize +) + +func (g *groupReference) cap(typ *swissMapType) uint64 { + _ = g + return groupCap(uint64(typ.GroupSize), uint64(typ.SlotSize)) +} + +func groupCap(groupSize, slotSize uint64) uint64 { + return (groupSize - uint64(groupSlotsOffset)) / slotSize +} + +// key returns a pointer to the key at index i. +func (g *groupReference) key(typ *swissMapType, i uintptr) unsafe.Pointer { + offset := groupSlotsOffset + i*typ.SlotSize + return unsafe.Pointer(uintptr(g.data) + offset) +} + +// elem returns a pointer to the element at index i. +func (g *groupReference) elem(typ *swissMapType, i uintptr) unsafe.Pointer { + offset := groupSlotsOffset + i*typ.SlotSize + typ.ElemOff + return unsafe.Pointer(uintptr(g.data) + offset) +} + +// MemAwareMap is a map with memory usage tracking. +type MemAwareMap[K comparable, V any] struct { + M map[K]V + groupSize uint64 + nextCheckpoint uint64 // every `maxTableCapacity` increase in Used + Bytes uint64 +} + +// MockSeedForTest sets the seed of the swissMap inside MemAwareMap +func (m *MemAwareMap[K, V]) MockSeedForTest(seed uint64) (oriSeed uint64) { + return m.unwrap().MockSeedForTest(seed) +} + +// MockSeedForTest sets the seed of the swissMap +func (m *swissMap) MockSeedForTest(seed uint64) (oriSeed uint64) { + if m.Used != 0 { + panic("MockSeedForTest can only be called on empty map") + } + oriSeed = uint64(m.seed) + m.seed = uintptr(seed) + return +} + +// Count returns the number of elements in the map. +func (m *MemAwareMap[K, V]) Count() int { + return len(m.M) +} + +// Empty returns true if the map is empty. +func (m *MemAwareMap[K, V]) Empty() bool { + return len(m.M) == 0 +} + +// Exist returns true if the key exists in the map. +func (m *MemAwareMap[K, V]) Exist(val K) bool { + _, ok := m.M[val] + return ok +} + +func (m *MemAwareMap[K, V]) unwrap() *swissMap { + return *(**swissMap)(unsafe.Pointer(&m.M)) +} + +// Set sets the value for the key in the map and returns the memory delta. +func (m *MemAwareMap[K, V]) Set(key K, value V) (deltaBytes int64) { + sm := m.unwrap() + m.M[key] = value + if sm.Used >= m.nextCheckpoint { + newBytes := max(m.Bytes, approxSize(m.groupSize, sm.Used)) + deltaBytes = int64(newBytes) - int64(m.Bytes) + m.Bytes = newBytes + m.nextCheckpoint = min(sm.Used, maxTableCapacity) + sm.Used + } + return +} + +// SetExt sets the value for the key in the map and returns the memory delta and whether it's an insert. +func (m *MemAwareMap[K, V]) SetExt(key K, value V) (deltaBytes int64, insert bool) { + sm := m.unwrap() + oriUsed := sm.Used + deltaBytes = m.Set(key, value) + insert = oriUsed != sm.Used + return +} + +// Init initializes the MemAwareMap with the given map and returns the initial memory size. +// The input map should NOT be nil. +func (m *MemAwareMap[K, V]) Init(v map[K]V) int64 { + if v == nil { + panic("MemAwareMap.Init: input map should NOT be nil") + } + m.M = v + sm := m.unwrap() + + m.groupSize = uint64(ToSwissMap(m.M).Type.GroupSize) + m.Bytes = sm.Size(m.groupSize) + if sm.Used <= swissMapGroupSlots { + m.nextCheckpoint = swissMapGroupSlots * 2 + } else { + m.nextCheckpoint = min(sm.Used, maxTableCapacity) + sm.Used + } + return int64(m.Bytes) +} + +// NewMemAwareMap creates a new MemAwareMap with the given initial capacity. +func NewMemAwareMap[K comparable, V any](capacity int) *MemAwareMap[K, V] { + m := new(MemAwareMap[K, V]) + m.Init(make(map[K]V, capacity)) + return m +} + +// RealBytes returns the real memory size of the map. +// Compute the real size is expensive, so do not call it frequently. +// Make sure the `seed` is same when testing the memory size. +func (m *MemAwareMap[K, V]) RealBytes() uint64 { + return m.unwrap().Size(m.groupSize) +} + +func checkMapABI() { + if !strings.Contains(runtime.Version(), `go1.25`) { + panic("The hack package only supports go1.25, please confirm the correctness of the ABI before upgrading") + } +} + +// Get the value of the key. +func (m *MemAwareMap[K, V]) Get(k K) (v V, ok bool) { + v, ok = m.M[k] + return +} + +// Len returns the number of elements in the map. +func (m *MemAwareMap[K, V]) Len() int { + return len(m.M) +} diff --git a/pkg/util/hack/map_abi_test.go b/pkg/util/hack/map_abi_test.go new file mode 100644 index 0000000000000..51692c34f48e1 --- /dev/null +++ b/pkg/util/hack/map_abi_test.go @@ -0,0 +1,237 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package hack + +import ( + "fmt" + "strconv" + "testing" + + "github.com/stretchr/testify/require" +) + +const seed = 4992862800126241206 // set the fixed seed for test + +func TestSwissTable(t *testing.T) { + require.True(t, maxTableCapacity == 1024) + { + m := make(map[int]int) + tp := ToSwissMap(m).Type + require.True(t, tp.GroupSize == 136) + require.True(t, tp.SlotSize == 16) + require.True(t, tp.ElemOff == 8) + } + { + m := make(map[int32]int32) + tp := ToSwissMap(m).Type + require.True(t, tp.GroupSize == 72) + require.True(t, tp.SlotSize == 8) + require.True(t, tp.ElemOff == 4) + } + { + m := make(map[int8]int8) + tp := ToSwissMap(m).Type + require.True(t, tp.GroupSize == 24) + require.True(t, tp.SlotSize == 2) + require.True(t, tp.ElemOff == 1) + } + { + m := make(map[int64]float64) + tp := ToSwissMap(m).Type + require.True(t, tp.GroupSize == 136) + require.True(t, tp.SlotSize == 16) + require.True(t, tp.ElemOff == 8) + } + { + m := make(map[complex128]complex128) + tp := ToSwissMap(m).Type + require.True(t, tp.GroupSize == 264) + require.True(t, tp.SlotSize == 32) + require.True(t, tp.ElemOff == 16) + } + { + const N = 1024 + mp := make(map[uint64]uint64) + sm := ToSwissMap(mp) + sm.Data.MockSeedForTest(seed) + mp[1234] = 5678 + for i := range N { + mp[uint64(i)] = uint64(i * 2) + } + require.Equal(t, N+1, len(mp)) + require.Equal(t, uint64(N+1), sm.Data.Used) + found := false + var lastTab *swissMapTable + + for i := range sm.Data.dirLen { + table := sm.Data.directoryAt(uintptr(i)) + if table == lastTab { + continue + } + for i := range table.groups.lengthMask + 1 { + ref := table.groups.group(sm.Type, i) + require.True(t, (sm.Type.GroupSize-groupSlotsOffset)%sm.Type.SlotSize == 0) + capacity := ref.cap(sm.Type) + require.True(t, capacity == swissMapGroupSlots) + for j := range capacity { + k, v := *(*uint64)(ref.key(sm.Type, uintptr(j))), *(*uint64)(ref.elem(sm.Type, uintptr(j))) + if k == 1234 && v == 5678 { + require.False(t, found) + found = true + break + } + } + } + } + require.True(t, found) + + oriSeed := sm.Data.seed + for k := range mp { + delete(mp, k) + } + require.True(t, oriSeed != sm.Data.seed) + } + { + const N = 2000 + mp := make(map[string]int) + sm := ToSwissMap(mp) + sm.Data.MockSeedForTest(seed) + for i := range N { + mp[fmt.Sprintf("key-%d", i)] = i + } + require.Equal(t, N, len(mp)) + require.Equal(t, N, int(sm.Data.Used)) + require.True(t, sm.Type.GroupSize == 200) + require.True(t, sm.Data.dirLen == 4) + require.Equal(t, 102608, int(sm.Size())) + } + { + mp := make(map[int]int) + require.Equal(t, 0, len(mp)) + sm := ToSwissMap(mp) + sm.Data.MockSeedForTest(seed) + require.Equal(t, 0, int(sm.Data.Used)) + require.True(t, sm.Type.GroupSize == 136) + require.Equal(t, 184, int(sm.Size())) + for i := range 8 { + mp[i] = i + } + require.Equal(t, 8, len(mp)) + require.Equal(t, 184, int(sm.Size())) + mp[9] = 9 + require.Equal(t, 9, len(mp)) + require.Equal(t, 360, int(sm.Size())) + } + + { + mp := make(map[complex128]complex128) + m := MemAwareMap[complex128, complex128]{} + const N = 1024*50 - 1 + delta := m.Init(mp) + m.MockSeedForTest(seed) + for i := range N { + k := complex(float64(i), float64(i)) + d := m.Set(k, k) + delta += d + if d > 0 { + sz := m.RealBytes() + expMin := sz * 75 / 100 + require.True(t, m.Bytes >= expMin, "ApproxSize %d, RealSize %d, index %d, expMin %d", m.Bytes, sz, i, expMin) + require.True(t, approxSize(m.groupSize, uint64(m.Len())) >= expMin, "ApproxSize %d, RealSize %d, index %d, expMin %d", m.Bytes, sz, i, expMin) + } + } + sz := m.RealBytes() + require.True(t, sz == 2165296, sz) + require.True(t, delta == 2702278, delta) + require.True(t, delta == int64(m.Bytes)) + require.True(t, seed == m.unwrap().seed) + clearSeq := m.unwrap().clearSeq + clear(m.M) + require.True(t, m.Len() == 0) + require.True(t, clearSeq+1 == m.unwrap().clearSeq) + require.True(t, m.unwrap().seed != seed) + require.True(t, sz == m.RealBytes()) + require.True(t, delta == int64(m.Bytes)) + + m.MockSeedForTest(seed) + for i := range 1024 { + k := complex(float64(i), float64(i)) + d, insert := m.SetExt(k, k) + require.True(t, d == 0) + require.True(t, insert) + } + require.True(t, m.Len() == 1024) + } +} + +var result int + +var inputs = []struct { + input int +}{ + {input: 1}, + {input: 100}, + {input: 10000}, + {input: 1000000}, +} + +func memAwareIntMap(size int) int { + var x int + m := NewMemAwareMap[int, int](0) + for j := range size { + m.Set(j, j) + } + for j := range size { + x, _ = m.Get(j) + } + return x +} + +func nativeIntMap(size int) int { + var x int + m := make(map[int]int) + for j := range size { + m[j] = j + } + + for j := range size { + x = m[j] + } + return x +} + +func BenchmarkMemAwareIntMap(b *testing.B) { + for _, s := range inputs { + b.Run("MemAwareIntMap_"+strconv.Itoa(s.input), func(b *testing.B) { + var x int + for b.Loop() { + x = memAwareIntMap(s.input) + } + result = x + }) + } +} + +func BenchmarkNativeIntMap(b *testing.B) { + for _, s := range inputs { + b.Run("NativeIntMap_"+strconv.Itoa(s.input), func(b *testing.B) { + var x int + for b.Loop() { + x = nativeIntMap(s.input) + } + result = x + }) + } +} diff --git a/pkg/util/set/BUILD.bazel b/pkg/util/set/BUILD.bazel index 5e3b1d0343d1a..9c7f8d7f76f96 100644 --- a/pkg/util/set/BUILD.bazel +++ b/pkg/util/set/BUILD.bazel @@ -5,7 +5,6 @@ go_library( srcs = [ "float64_set.go", "int_set.go", - "mem_aware_map.go", "set.go", "set_with_memory_usage.go", "string_set.go", @@ -26,7 +25,6 @@ go_test( "float64_set_test.go", "int_set_test.go", "main_test.go", - "mem_aware_map_test.go", "set_test.go", "set_with_memory_usage_test.go", "string_set_test.go", diff --git a/pkg/util/set/mem_aware_map.go b/pkg/util/set/mem_aware_map.go deleted file mode 100644 index 0ec3c773229e5..0000000000000 --- a/pkg/util/set/mem_aware_map.go +++ /dev/null @@ -1,72 +0,0 @@ -// 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. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package set - -import ( - "math" - - "github.com/pingcap/tidb/pkg/util/hack" -) - -// MemAwareMap is a map which is aware of its memory usage. It's adapted from SetWithMemoryUsage. -// It doesn't support delete. -// The estimate usage of memory is usually smaller than the real usage. -// According to experiments with SetWithMemoryUsage, 2/3 * estimated usage <= real usage <= estimated usage. -type MemAwareMap[K comparable, V any] struct { - M map[K]V // it's public, when callers want to directly access it, e.g. use in a for-range-loop - bInMap int64 - bucketMemoryUsage uint64 -} - -// EstimateMapSize returns the estimated size of the map. It doesn't include the dynamic part, e.g. objects pointed to by pointers in the map. -// len(map) <= load_factor * 2^bInMap. bInMap = ceil(log2(len(map)/load_factor)). -// memory = bucketSize * 2^bInMap -func EstimateMapSize(length int, bucketSize uint64) uint64 { - if length == 0 { - return 0 - } - bInMap := uint64(math.Ceil(math.Log2(float64(length) * hack.LoadFactorDen / float64(hack.LoadFactorNum)))) - return bucketSize * uint64(1< (1< (1< (1< (1<] set global tidb_mem_oom_action = DEFAULT; diff --git a/tests/integrationtest/t/executor/index_merge_reader.test b/tests/integrationtest/t/executor/index_merge_reader.test index b91ef7fe1f13d..2ea56a38dcf9d 100644 --- a/tests/integrationtest/t/executor/index_merge_reader.test +++ b/tests/integrationtest/t/executor/index_merge_reader.test @@ -280,7 +280,7 @@ create table t1(pk varchar(100) primary key, c1 int, c2 int, index idx1(c1), ind insert into t1 values('TXwuGSfZfrgVbTksgvQBilqiUXlNEXzyXNqWRTCidzXFbrkpGFJalRMdVGQOAOojditwludthMcitNqNtvirGAudSNBtdIkpJIHQ', 1, 1), ('LSiKhgTNnuyjdBtuKKuRgzrcxbHrIlfxSkEuooaPYwfOBVQfNYAyatHiWvmUWRUvBLvXmpqAJUWRXXHFCLCjuJqFbVxQdUxqRuqW', 1, 1), ('qCOSFbvtmansHENQaAQbnyYOwCTPctlejpbpueHbtzskmPOazrMWdcMLaYjyfxYQUgDDjCnAnnExepNqwYIzHVjNVndlOzFaAOcf', 1, 1), ('qBqdtPyXIqLKynGNHnRlrufuUCZPqhxUYEqIrYERnQdqXRjVWcoYclxYXoqdpQboKydzhOHOWBwtmcXzGwCWQVdbpozvIaXxiBQj', 1, 1), ('TXZlGHnXOiSWGyRafAqworFmxuadHRTHcYyzLqZMzIMGUUBQmgiIJKQOqbHhoPEKbYBgfPDZJwwqgnCbMxZKaZfvGyVRRUOgRhoq', 1, 1), ('SwFEtKDfPDQpsyxTdTruPyNDLvEOLRdQtSttxJmgBuZiVKsflHCDZaGvkLHMqhHqLayfbZFrxUHzWHgfoPFCWCdCHScabWRNCHCL', 1, 1), ('BuZhnsTMGNtMJtrjjdMMrguutSpiLnZNCdgiNkWDPymzIymcujjBtsnKCAVRSErvbzPaOwLTTPWkGmbXltqOJXmkXnSWWlWaaBqe', 1, 1), ('LuJCpJrLUwDJutwBDtGEsGduteBWPHeGLVhmVJYVrmjunKNuplEeWDCMIAxHPoiRmdPnXneQEQWRvJkPBoXOPaGZhhFLFgGraLmH', 1, 1), ('JKJwMlPmymduJWOmKLFBmZyCFrcUvKcGQkzJmzGjuFoZweyCBptswEPHTkaIhWEEBMWzNBawtfYKKAugBNlxcwmpJSfuIAUSIxeG', 1, 1), ('IqQbehKwleoSUnwxrVLKSbzRqlEFfkwQtRtIfaVpEGfESyGjDJeAOWQPRYVQYvlPNPROQEraCqwQTzanPSrsnUvEXHSxcYjUJvzk', 1, 1), ('zNHmiBGCLUUEDgMAeIGuTgNJFPBtePpxcQrQlgnRlvosJfeYbhRfJdfMwXIRlXxVoOowhEvPhMQPlplzkUfjjmzdJKwGATvfDAiT', 1, 1), ('OjQvpfdsHSdZUAmGfmtQaYKYONAFHGNLeLKRYECqshxygiOzfKkqRwSYGgClqqnpHqPMZpqsjIYSalziqSfMbbtmmzxkOVgglVOh', 1, 1), ('dXXZaWDwdfhjIysLTNMSfwvoEBJhWOVpJnfXFofWSWMfMbUlRgAkobxoCxXPXNUWzAQczbQclQpvIvvATHHcQgdXUvwSTHqLXZny', 1, 1), ('haPqYVwFNUkedfIKPOPyUxIvbSkaUbsEWNvnDtXZsQQqafIhDXlajYpuXOSYiOwGJYAMVLUvXfwOIuyHKElzJHpOUdCiQiXRHubI', 1, 1), ('nQzOwSsVBjCpehVVmLeyYwyVEwYGAfkhCtkkaKyiXzYCRPRVZpNVnOXGbuWrQEgTuPEPFPApUaYLdCtyBEQulFEwyHlORrMfIJxr', 1, 1), ('ksGDopwNPvpjeCtAMaTrznDSgCLpRDQoCdsahWSjwumVEJITbNBPAAtkoxHuwmNQsryoILqCPBPiUSxAWjnFEdtxDIgEtqDiFvpO', 1, 1), ('AdWEZYzxCMhfcZseNVmNQpyqJrVKcKaZpKKcwZXfDPeIBMzkLzpJpOenidMBtBPBIbaiqfpSxBnGtRHAksBOgpigQTVomZzJhCFb', 1, 1), ('bVMNkLOAuRHqnCtGvVPLvmVSKihYFotmHTjObiAIARHawZTruAabGpFxeYxYTTFRxteFYyBfkBfiSEIFvOPquDnlVRNUUubssEMz', 1, 1), ('kXmcjqMYzGxvHBRRCovSTWavDnVajKLlxguJgniJeNkWQUxjHjYjBsveLfojybWkbqHBVzrOoqgXFrDnnRJPcybmnuAEUTPUoIjO', 1, 1), ('rVXzZDKudOpWCBuRCoQCpukHxenZnsaptDeJCCFzxMVvNucFwLKIiSceLsqUHHQuEfAIygjQCCkIbfInGthSnoLdNGWbsLDsxnrY', 1, 1); explain format='brief' select /*+ use_index_merge(t1, primary, idx1, idx2) */ c1 from t1 where c1 < 1024 and c2 < 1024; set global tidb_mem_oom_action='CANCEL'; -set @@tidb_mem_quota_query = 4000; +set @@tidb_mem_quota_query = 3000; -- replace_regex /conn=[-0-9]+/conn=/ -- error 8175 select /*+ use_index_merge(t1, primary, idx1, idx2) */ c1 from t1 where c1 < 1024 and c2 < 1024; diff --git a/tests/realtikvtest/sessiontest/BUILD.bazel b/tests/realtikvtest/sessiontest/BUILD.bazel index c733f8a372b29..dbf864947aabb 100644 --- a/tests/realtikvtest/sessiontest/BUILD.bazel +++ b/tests/realtikvtest/sessiontest/BUILD.bazel @@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( name = "sessiontest_test", - timeout = "moderate", + timeout = "long", srcs = [ "infoschema_v2_test.go", "main_test.go", diff --git a/tests/realtikvtest/txntest/BUILD.bazel b/tests/realtikvtest/txntest/BUILD.bazel index bffdabcc875cd..64080deb7ef82 100644 --- a/tests/realtikvtest/txntest/BUILD.bazel +++ b/tests/realtikvtest/txntest/BUILD.bazel @@ -2,7 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( name = "txntest_test", - timeout = "moderate", + timeout = "long", srcs = [ "isolation_test.go", "main_test.go", diff --git a/tools/check/bazel-check-abi.sh b/tools/check/bazel-check-abi.sh new file mode 100755 index 0000000000000..07765d614cd71 --- /dev/null +++ b/tools/check/bazel-check-abi.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Copyright 2025 PingCAP, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -euo pipefail + +GOROOT=$(bazel run @io_bazel_rules_go//go -- env GOROOT) +cd ${GOROOT} + +gosrc_md5=() +gosrc_md5+=("src/internal/runtime/maps/map.go a29531cd3447fd3c90ceabfde5a08921") +gosrc_md5+=("src/internal/runtime/maps/table.go 1ff4f281722eb83ac7d64ae0453e9718") +gosrc_md5+=("src/internal/abi/map_swiss.go 7ef614406774c5be839e63aea0225b00") +gosrc_md5+=("src/internal/abi/type.go d0caafb471a5b971854ca6426510608c") + +for x in "${gosrc_md5[@]}"; do + x=($x) + src="${x[0]}" + md5="${x[1]}" + echo "Checking ${src}" + if [ $(md5sum "${src}" | cut -d' ' -f1) != "${md5}" ]; then + echo "Unexpect checksum for ${src}" + exit -1 + fi +done