diff --git a/DEPS.bzl b/DEPS.bzl index fb4713a61069e..dfab794f65894 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -8,39 +8,39 @@ def go_deps(): name = "cc_mvdan_gofumpt", build_file_proto_mode = "disable_global", importpath = "mvdan.cc/gofumpt", - sha256 = "7a05a751cc4b8eed6ca0b3f17720f21005ae14136472fc0a358864b559f36249", - strip_prefix = "mvdan.cc/gofumpt@v0.6.0", + sha256 = "244f172eb30d8b3a413905ae83237220541a5fabcf28855db55f053819c4bc41", + strip_prefix = "mvdan.cc/gofumpt@v0.7.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.6.0.zip", - "http://ats.apps.svc/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.6.0.zip", - "https://cache.hawkingrei.com/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.6.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.6.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.7.0.zip", + "http://ats.apps.svc/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.7.0.zip", + "https://cache.hawkingrei.com/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.7.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/mvdan.cc/gofumpt/cc_mvdan_gofumpt-v0.7.0.zip", ], ) go_repository( name = "cc_mvdan_unparam", build_file_proto_mode = "disable_global", importpath = "mvdan.cc/unparam", - sha256 = "25aeecd0b84daff70d162df59a3e231591252ab5a048bcf40c1aa38afdc5ef81", - strip_prefix = "mvdan.cc/unparam@v0.0.0-20240427195214-063aff900ca1", + sha256 = "80ec3366de484e2aa6849d02c654f15288a03cac0173ffb5255c33e75a58a11a", + strip_prefix = "mvdan.cc/unparam@v0.0.0-20240528143540-8a5130ca722f", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240427195214-063aff900ca1.zip", - "http://ats.apps.svc/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240427195214-063aff900ca1.zip", - "https://cache.hawkingrei.com/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240427195214-063aff900ca1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240427195214-063aff900ca1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240528143540-8a5130ca722f.zip", + "http://ats.apps.svc/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240528143540-8a5130ca722f.zip", + "https://cache.hawkingrei.com/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240528143540-8a5130ca722f.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/mvdan.cc/unparam/cc_mvdan_unparam-v0.0.0-20240528143540-8a5130ca722f.zip", ], ) go_repository( name = "co_honnef_go_tools", build_file_proto_mode = "disable_global", importpath = "honnef.co/go/tools", - sha256 = "84b304edb7aa479c9aa7dcbbb0937f21f97c3c1790ee204eab35daf60ad245fa", - strip_prefix = "honnef.co/go/tools@v0.4.7", + sha256 = "d728ff392fc5b6f676a30c36e9d0a5b85f6f2e06b4ebbb121c27d965cbdffa11", + strip_prefix = "honnef.co/go/tools@v0.5.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.4.7.zip", - "http://ats.apps.svc/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.4.7.zip", - "https://cache.hawkingrei.com/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.4.7.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.4.7.zip", + "http://bazel-cache.pingcap.net:8080/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.5.1.zip", + "http://ats.apps.svc/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.5.1.zip", + "https://cache.hawkingrei.com/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.5.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/honnef.co/go/tools/co_honnef_go_tools-v0.5.1.zip", ], ) go_repository( @@ -86,13 +86,13 @@ def go_deps(): name = "com_github_abirdcfly_dupword", build_file_proto_mode = "disable_global", importpath = "github.com/Abirdcfly/dupword", - sha256 = "5d33023629e82bc97c38319c3f78aae3945fccc1bc0a204040b190eafe6505ca", - strip_prefix = "github.com/Abirdcfly/dupword@v0.0.14", + sha256 = "cc07b12c93417a498bfd327fcb53070c5ae771d6d0263f9a38fd707c137766fc", + strip_prefix = "github.com/Abirdcfly/dupword@v0.1.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.0.14.zip", - "http://ats.apps.svc/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.0.14.zip", - "https://cache.hawkingrei.com/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.0.14.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.0.14.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.1.1.zip", + "http://ats.apps.svc/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.1.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.1.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Abirdcfly/dupword/com_github_abirdcfly_dupword-v0.1.1.zip", ], ) go_repository( @@ -320,13 +320,13 @@ def go_deps(): name = "com_github_antonboom_testifylint", build_file_proto_mode = "disable_global", importpath = "github.com/Antonboom/testifylint", - sha256 = "6dc9c2eaf1b893a03bfde8ced3f3dc80abb024b01da6f4b81a0604bd640e86cd", - strip_prefix = "github.com/Antonboom/testifylint@v1.3.0", + sha256 = "a047122f5f48e41e25e25ee91f31a0d4b0b6ad608d8d2e99e4e74f7b6ab7f114", + strip_prefix = "github.com/Antonboom/testifylint@v1.4.3", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.3.0.zip", - "http://ats.apps.svc/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.3.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.3.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.3.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.4.3.zip", + "http://ats.apps.svc/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.4.3.zip", + "https://cache.hawkingrei.com/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.4.3.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Antonboom/testifylint/com_github_antonboom_testifylint-v1.4.3.zip", ], ) go_repository( @@ -450,13 +450,13 @@ def go_deps(): name = "com_github_aws_aws_sdk_go", build_file_proto_mode = "disable_global", importpath = "github.com/aws/aws-sdk-go", - sha256 = "626ad62e145c8499afb67cd13b438e4a2d5b855ac2dd94c87f5e72e1d0e53365", - strip_prefix = "github.com/aws/aws-sdk-go@v1.50.0", + sha256 = "5d0522d952824a79d837bba9c0dfe1b024628a99be4f1d031611e18d7e98bbce", + strip_prefix = "github.com/aws/aws-sdk-go@v1.55.5", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.50.0.zip", - "http://ats.apps.svc/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.50.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.50.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.50.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.55.5.zip", + "http://ats.apps.svc/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.55.5.zip", + "https://cache.hawkingrei.com/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.55.5.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/aws/aws-sdk-go/com_github_aws_aws_sdk_go-v1.55.5.zip", ], ) go_repository( @@ -710,13 +710,13 @@ def go_deps(): name = "com_github_bombsimon_wsl_v4", build_file_proto_mode = "disable_global", importpath = "github.com/bombsimon/wsl/v4", - sha256 = "b43bea65b820b7ca13b4b378902dbf3111965b94490a92055a5121a2c3a573b3", - strip_prefix = "github.com/bombsimon/wsl/v4@v4.2.1", + sha256 = "7071bec41122acb8bcd49d778c4c9606d9e43faa5120eb51bfb5e347bafc3023", + strip_prefix = "github.com/bombsimon/wsl/v4@v4.4.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.2.1.zip", - "http://ats.apps.svc/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.2.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.2.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.2.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.4.1.zip", + "http://ats.apps.svc/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.4.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.4.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/bombsimon/wsl/v4/com_github_bombsimon_wsl_v4-v4.4.1.zip", ], ) go_repository( @@ -736,13 +736,13 @@ def go_deps(): name = "com_github_breml_bidichk", build_file_proto_mode = "disable_global", importpath = "github.com/breml/bidichk", - sha256 = "ceab3b883c2afc022dbc17831abadf3ffb1ddea7be9bdf200d9d98b84cce46e8", - strip_prefix = "github.com/breml/bidichk@v0.2.7", + sha256 = "83d8ad2830112b1ae370b1271fcf4a05ab78f001313b73efd5854ea541aed3b6", + strip_prefix = "github.com/breml/bidichk@v0.3.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.2.7.zip", - "http://ats.apps.svc/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.2.7.zip", - "https://cache.hawkingrei.com/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.2.7.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.2.7.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.3.1.zip", + "http://ats.apps.svc/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.3.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.3.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/breml/bidichk/com_github_breml_bidichk-v0.3.1.zip", ], ) go_repository( @@ -762,13 +762,13 @@ def go_deps(): name = "com_github_burntsushi_toml", build_file_proto_mode = "disable_global", importpath = "github.com/BurntSushi/toml", - sha256 = "d9274d5bffdb7ff09889055b42d9e123783565ee776d63a7315219ec15a98276", - strip_prefix = "github.com/BurntSushi/toml@v1.4.0", + sha256 = "f15f0ca7a3c5a4275d3d560236f178e9d735a084534bf3b685ec5f676806230a", + strip_prefix = "github.com/BurntSushi/toml@v1.4.1-0.20240526193622-a339e1f7089c", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.0.zip", - "http://ats.apps.svc/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/BurntSushi/toml/com_github_burntsushi_toml-v1.4.0.zip", + "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", ], ) go_repository( @@ -953,45 +953,6 @@ def go_deps(): "https://storage.googleapis.com/pingcapmirror/gomod/github.com/cheynewallace/tabby/com_github_cheynewallace_tabby-v1.1.1.zip", ], ) - go_repository( - name = "com_github_chromedp_cdproto", - build_file_proto_mode = "disable_global", - importpath = "github.com/chromedp/cdproto", - sha256 = "23440cb9922bc66da55e23455aaf53799b4e838516dfca92202f29d21f9f4ad3", - strip_prefix = "github.com/chromedp/cdproto@v0.0.0-20230802225258-3cf4e6d46a89", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/chromedp/cdproto/com_github_chromedp_cdproto-v0.0.0-20230802225258-3cf4e6d46a89.zip", - "http://ats.apps.svc/gomod/github.com/chromedp/cdproto/com_github_chromedp_cdproto-v0.0.0-20230802225258-3cf4e6d46a89.zip", - "https://cache.hawkingrei.com/gomod/github.com/chromedp/cdproto/com_github_chromedp_cdproto-v0.0.0-20230802225258-3cf4e6d46a89.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/chromedp/cdproto/com_github_chromedp_cdproto-v0.0.0-20230802225258-3cf4e6d46a89.zip", - ], - ) - go_repository( - name = "com_github_chromedp_chromedp", - build_file_proto_mode = "disable_global", - importpath = "github.com/chromedp/chromedp", - sha256 = "f141d0c242b87bafe550404588cd86ba1e6ba05d9d1774ce96d4d097455b51d6", - strip_prefix = "github.com/chromedp/chromedp@v0.9.2", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/chromedp/chromedp/com_github_chromedp_chromedp-v0.9.2.zip", - "http://ats.apps.svc/gomod/github.com/chromedp/chromedp/com_github_chromedp_chromedp-v0.9.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/chromedp/chromedp/com_github_chromedp_chromedp-v0.9.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/chromedp/chromedp/com_github_chromedp_chromedp-v0.9.2.zip", - ], - ) - go_repository( - name = "com_github_chromedp_sysutil", - build_file_proto_mode = "disable_global", - importpath = "github.com/chromedp/sysutil", - sha256 = "0d2f5cf0478bef0a8ee71e8b60a9279fd55b07cbfc66dbcfbf5a5f4ccb905c62", - strip_prefix = "github.com/chromedp/sysutil@v1.0.0", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/chromedp/sysutil/com_github_chromedp_sysutil-v1.0.0.zip", - "http://ats.apps.svc/gomod/github.com/chromedp/sysutil/com_github_chromedp_sysutil-v1.0.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/chromedp/sysutil/com_github_chromedp_sysutil-v1.0.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/chromedp/sysutil/com_github_chromedp_sysutil-v1.0.0.zip", - ], - ) go_repository( name = "com_github_chzyer_logex", build_file_proto_mode = "disable_global", @@ -1048,13 +1009,13 @@ def go_deps(): name = "com_github_ckaznocha_intrange", build_file_proto_mode = "disable_global", importpath = "github.com/ckaznocha/intrange", - sha256 = "46655c00818508557f76eaed9da3f5b5497ae34fcfd99c3dd2179bedaeac6dc9", - strip_prefix = "github.com/ckaznocha/intrange@v0.1.2", + sha256 = "2cdefa74cabc9bfe27168929f68fe2927143899e8a340e932d030c3206101d82", + strip_prefix = "github.com/ckaznocha/intrange@v0.2.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.1.2.zip", - "http://ats.apps.svc/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.1.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.1.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.1.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.2.1.zip", + "http://ats.apps.svc/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.2.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.2.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ckaznocha/intrange/com_github_ckaznocha_intrange-v0.2.1.zip", ], ) go_repository( @@ -1386,13 +1347,13 @@ def go_deps(): name = "com_github_cpuguy83_go_md2man_v2", build_file_proto_mode = "disable_global", importpath = "github.com/cpuguy83/go-md2man/v2", - sha256 = "aa86a286ada95599a9c8e297623d12c4d4eb6ec6334c79d6dc8b3353a748f10d", - strip_prefix = "github.com/cpuguy83/go-md2man/v2@v2.0.3", + sha256 = "9adbaa17f17dbe36ae464d8062acbbfb9cf853bfebed424435a834a2b0bed910", + strip_prefix = "github.com/cpuguy83/go-md2man/v2@v2.0.4", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.3.zip", - "http://ats.apps.svc/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.3.zip", - "https://cache.hawkingrei.com/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.3.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.3.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.4.zip", + "http://ats.apps.svc/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.4.zip", + "https://cache.hawkingrei.com/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.4.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/cpuguy83/go-md2man/v2/com_github_cpuguy83_go_md2man_v2-v2.0.4.zip", ], ) go_repository( @@ -1412,13 +1373,13 @@ def go_deps(): name = "com_github_crocmagnon_fatcontext", build_file_proto_mode = "disable_global", importpath = "github.com/Crocmagnon/fatcontext", - sha256 = "cedbb10954148c7e528493c73770925de8cfe1602d78f51e348f115d6f045acc", - strip_prefix = "github.com/Crocmagnon/fatcontext@v0.2.2", + sha256 = "1ff4d8805b98e74ffe50e6b6d1c3759b69b09c8babe800b88aa25e2fc10b6805", + strip_prefix = "github.com/Crocmagnon/fatcontext@v0.5.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.2.2.zip", - "http://ats.apps.svc/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.2.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.2.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.2.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.5.2.zip", + "http://ats.apps.svc/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.5.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.5.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Crocmagnon/fatcontext/com_github_crocmagnon_fatcontext-v0.5.2.zip", ], ) go_repository( @@ -1477,13 +1438,13 @@ def go_deps(): name = "com_github_daixiang0_gci", build_file_proto_mode = "disable_global", importpath = "github.com/daixiang0/gci", - sha256 = "912505818a9c36b0090a7a4c786bc8ae090e375f3e3c0244770fc36491cb3b1f", - strip_prefix = "github.com/daixiang0/gci@v0.13.4", + sha256 = "da733aada4479009b0fb95eda7cb8a92247c5291404ee3543071258b4fc30f9d", + strip_prefix = "github.com/daixiang0/gci@v0.13.5", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.4.zip", - "http://ats.apps.svc/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.4.zip", - "https://cache.hawkingrei.com/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.4.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.4.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.5.zip", + "http://ats.apps.svc/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.5.zip", + "https://cache.hawkingrei.com/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.5.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/daixiang0/gci/com_github_daixiang0_gci-v0.13.5.zip", ], ) go_repository( @@ -2062,13 +2023,13 @@ def go_deps(): name = "com_github_gaijinentertainment_go_exhaustruct_v3", build_file_proto_mode = "disable_global", importpath = "github.com/GaijinEntertainment/go-exhaustruct/v3", - sha256 = "ea73dfe7281f82b1fb955e087a865d9def560e7c149258ab251517271b1cb15f", - strip_prefix = "github.com/GaijinEntertainment/go-exhaustruct/v3@v3.2.0", + sha256 = "59e6345f8758331dd5b059fa1a9f7f54a03206cd096f5cd239e7a1eb54b99c07", + strip_prefix = "github.com/GaijinEntertainment/go-exhaustruct/v3@v3.3.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.2.0.zip", - "http://ats.apps.svc/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.2.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.2.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.2.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.3.0.zip", + "http://ats.apps.svc/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.3.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.3.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/GaijinEntertainment/go-exhaustruct/v3/com_github_gaijinentertainment_go_exhaustruct_v3-v3.3.0.zip", ], ) go_repository( @@ -2114,13 +2075,13 @@ def go_deps(): name = "com_github_ghostiam_protogetter", build_file_proto_mode = "disable_global", importpath = "github.com/ghostiam/protogetter", - sha256 = "67aa66a7346aefbe6ebd3e1c4b9fdd0fb54af284c82b8788c7d15b8a9a5abfcf", - strip_prefix = "github.com/ghostiam/protogetter@v0.3.6", + sha256 = "55355f5017049085fcef1b7d9fbf9f6b774485dc2e06d5554cf6e2a564a04ada", + strip_prefix = "github.com/ghostiam/protogetter@v0.3.8", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.6.zip", - "http://ats.apps.svc/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.6.zip", - "https://cache.hawkingrei.com/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.6.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.6.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.8.zip", + "http://ats.apps.svc/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.8.zip", + "https://cache.hawkingrei.com/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.8.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ghostiam/protogetter/com_github_ghostiam_protogetter-v0.3.8.zip", ], ) go_repository( @@ -2699,13 +2660,13 @@ def go_deps(): name = "com_github_go_viper_mapstructure_v2", build_file_proto_mode = "disable_global", importpath = "github.com/go-viper/mapstructure/v2", - sha256 = "3b8336eed67f93b0d9c0e087d2f6e08e56fb01fc5c8d518c9b1fdda0fbcb5c62", - strip_prefix = "github.com/go-viper/mapstructure/v2@v2.0.0-alpha.1", + sha256 = "e1ea7643504db811d7af92e61b919b9a56c3a15a6ad56ffd8327625bf6e5f3f8", + strip_prefix = "github.com/go-viper/mapstructure/v2@v2.1.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.0.0-alpha.1.zip", - "http://ats.apps.svc/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.0.0-alpha.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.0.0-alpha.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.0.0-alpha.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.1.0.zip", + "http://ats.apps.svc/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.1.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.1.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/go-viper/mapstructure/v2/com_github_go_viper_mapstructure_v2-v2.1.0.zip", ], ) go_repository( @@ -2747,45 +2708,6 @@ def go_deps(): "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gobwas/glob/com_github_gobwas_glob-v0.2.3.zip", ], ) - go_repository( - name = "com_github_gobwas_httphead", - build_file_proto_mode = "disable_global", - importpath = "github.com/gobwas/httphead", - sha256 = "a4646f1d12786fee639c489219e7c667b10f7dc19578a4e7222bd17c5d9bdf8a", - strip_prefix = "github.com/gobwas/httphead@v0.1.0", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/gobwas/httphead/com_github_gobwas_httphead-v0.1.0.zip", - "http://ats.apps.svc/gomod/github.com/gobwas/httphead/com_github_gobwas_httphead-v0.1.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/gobwas/httphead/com_github_gobwas_httphead-v0.1.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gobwas/httphead/com_github_gobwas_httphead-v0.1.0.zip", - ], - ) - go_repository( - name = "com_github_gobwas_pool", - build_file_proto_mode = "disable_global", - importpath = "github.com/gobwas/pool", - sha256 = "79b505a9f42b141affca1eedd2edc87ae922482d052e16e3b6e5e3c9dcec89e1", - strip_prefix = "github.com/gobwas/pool@v0.2.1", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/gobwas/pool/com_github_gobwas_pool-v0.2.1.zip", - "http://ats.apps.svc/gomod/github.com/gobwas/pool/com_github_gobwas_pool-v0.2.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/gobwas/pool/com_github_gobwas_pool-v0.2.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gobwas/pool/com_github_gobwas_pool-v0.2.1.zip", - ], - ) - go_repository( - name = "com_github_gobwas_ws", - build_file_proto_mode = "disable_global", - importpath = "github.com/gobwas/ws", - sha256 = "423d7d8b1364e1d9b0c4418905f7dfc29c092dc2db4c80fb66b695d4a002daca", - strip_prefix = "github.com/gobwas/ws@v1.2.1", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.2.1.zip", - "http://ats.apps.svc/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.2.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.2.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gobwas/ws/com_github_gobwas_ws-v1.2.1.zip", - ], - ) go_repository( name = "com_github_goccy_go_json", build_file_proto_mode = "disable_global", @@ -2829,13 +2751,13 @@ def go_deps(): name = "com_github_gofrs_flock", build_file_proto_mode = "disable_global", importpath = "github.com/gofrs/flock", - sha256 = "9ace5b0a05672937904fba1fcb86cb45e7f701e508faeb5f612e243340351dfa", - strip_prefix = "github.com/gofrs/flock@v0.8.1", + sha256 = "fe8242a48c3109148d988433301bd8ab3cd1d0430a21af07e601f9b0671923e8", + strip_prefix = "github.com/gofrs/flock@v0.12.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.8.1.zip", - "http://ats.apps.svc/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.8.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.8.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.8.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.12.1.zip", + "http://ats.apps.svc/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.12.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.12.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gofrs/flock/com_github_gofrs_flock-v0.12.1.zip", ], ) go_repository( @@ -3024,26 +2946,26 @@ def go_deps(): name = "com_github_golangci_gofmt", build_file_proto_mode = "disable_global", importpath = "github.com/golangci/gofmt", - sha256 = "ffca3283ab68db353f1e8e312c9d178cc6384db4179c5f214e553fe60380f68d", - strip_prefix = "github.com/golangci/gofmt@v0.0.0-20231019111953-be8c47862aaa", + sha256 = "3b17738f4489dd32e4dde55d2e2e6283f5136c836b21e8388399f11a19687dde", + strip_prefix = "github.com/golangci/gofmt@v0.0.0-20240816233607-d8596aa466a9", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20231019111953-be8c47862aaa.zip", - "http://ats.apps.svc/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20231019111953-be8c47862aaa.zip", - "https://cache.hawkingrei.com/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20231019111953-be8c47862aaa.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20231019111953-be8c47862aaa.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20240816233607-d8596aa466a9.zip", + "http://ats.apps.svc/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20240816233607-d8596aa466a9.zip", + "https://cache.hawkingrei.com/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20240816233607-d8596aa466a9.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/gofmt/com_github_golangci_gofmt-v0.0.0-20240816233607-d8596aa466a9.zip", ], ) go_repository( name = "com_github_golangci_golangci_lint", build_file_proto_mode = "disable_global", importpath = "github.com/golangci/golangci-lint", - sha256 = "dfef9653f3b7a5b8ffdf7581fd15ba31b8f9c8f6465454fb716135c805f68930", - strip_prefix = "github.com/golangci/golangci-lint@v1.59.0", + sha256 = "306bf595db28772ad29017ba55755d8acca4a7c601f330719b5e6f310e074cb4", + strip_prefix = "github.com/golangci/golangci-lint@v1.61.1-0.20240915150923-7187c89d4091", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.59.0.zip", - "http://ats.apps.svc/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.59.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.59.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.59.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.61.1-0.20240915150923-7187c89d4091.zip", + "http://ats.apps.svc/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.61.1-0.20240915150923-7187c89d4091.zip", + "https://cache.hawkingrei.com/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.61.1-0.20240915150923-7187c89d4091.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/golangci-lint/com_github_golangci_golangci_lint-v1.61.1-0.20240915150923-7187c89d4091.zip", ], ) go_repository( @@ -3063,13 +2985,13 @@ def go_deps(): name = "com_github_golangci_misspell", build_file_proto_mode = "disable_global", importpath = "github.com/golangci/misspell", - sha256 = "945083642b79fd34a825945173e37456bc0a25e6eda0817c21419cc7a81c3183", - strip_prefix = "github.com/golangci/misspell@v0.5.1", + sha256 = "7d81b8e0253606180e30862476b4d88964db3ab5f909bc205b29c3aeb33e91a2", + strip_prefix = "github.com/golangci/misspell@v0.6.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.5.1.zip", - "http://ats.apps.svc/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.5.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.5.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.5.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.6.0.zip", + "http://ats.apps.svc/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.6.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.6.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/golangci/misspell/com_github_golangci_misspell-v0.6.0.zip", ], ) go_repository( @@ -3284,13 +3206,13 @@ def go_deps(): name = "com_github_google_pprof", build_file_proto_mode = "disable_global", importpath = "github.com/google/pprof", - sha256 = "587c3a10510505eb10369aa89f5648eee6632187f9a83b11f96be9e567284791", - strip_prefix = "github.com/google/pprof@v0.0.0-20240117000934-35fc243c5815", + sha256 = "06752f6d2f5626adaa18120fb1ae2f96f6501f05c23022b64fc1a79f832b3c4d", + strip_prefix = "github.com/google/pprof@v0.0.0-20241001023024-f4c0cfd0cf1d", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20240117000934-35fc243c5815.zip", - "http://ats.apps.svc/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20240117000934-35fc243c5815.zip", - "https://cache.hawkingrei.com/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20240117000934-35fc243c5815.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20240117000934-35fc243c5815.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20241001023024-f4c0cfd0cf1d.zip", + "http://ats.apps.svc/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20241001023024-f4c0cfd0cf1d.zip", + "https://cache.hawkingrei.com/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20241001023024-f4c0cfd0cf1d.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/google/pprof/com_github_google_pprof-v0.0.0-20241001023024-f4c0cfd0cf1d.zip", ], ) go_repository( @@ -3440,13 +3362,13 @@ def go_deps(): name = "com_github_gorilla_mux", build_file_proto_mode = "disable_global", importpath = "github.com/gorilla/mux", - sha256 = "7641911e00af9c91f089868333067c9cb9a58702d2c9ea821ee374940091c385", - strip_prefix = "github.com/gorilla/mux@v1.8.0", + sha256 = "728243623caa67f64e4a0b6c59dde3f762918d9e729266167ba46d8df56c193a", + strip_prefix = "github.com/gorilla/mux@v1.8.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.0.zip", - "http://ats.apps.svc/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.1.zip", + "http://ats.apps.svc/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/gorilla/mux/com_github_gorilla_mux-v1.8.1.zip", ], ) go_repository( @@ -3874,13 +3796,13 @@ def go_deps(): name = "com_github_ianlancetaylor_demangle", build_file_proto_mode = "disable_global", importpath = "github.com/ianlancetaylor/demangle", - sha256 = "b6426a32f7d0525c6a6012a5be7b14ba57a59810d949fadb3bfec22f66604cac", - strip_prefix = "github.com/ianlancetaylor/demangle@v0.0.0-20230524184225-eabc099b10ab", + sha256 = "fce8f9022445dfed0afd86e09efd896fc48d491f6059b32a71fe887de5d437a6", + strip_prefix = "github.com/ianlancetaylor/demangle@v0.0.0-20240312041847-bd984b5ce465", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20230524184225-eabc099b10ab.zip", - "http://ats.apps.svc/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20230524184225-eabc099b10ab.zip", - "https://cache.hawkingrei.com/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20230524184225-eabc099b10ab.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20230524184225-eabc099b10ab.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20240312041847-bd984b5ce465.zip", + "http://ats.apps.svc/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20240312041847-bd984b5ce465.zip", + "https://cache.hawkingrei.com/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20240312041847-bd984b5ce465.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ianlancetaylor/demangle/com_github_ianlancetaylor_demangle-v0.0.0-20240312041847-bd984b5ce465.zip", ], ) go_repository( @@ -4108,13 +4030,13 @@ def go_deps(): name = "com_github_jjti_go_spancheck", build_file_proto_mode = "disable_global", importpath = "github.com/jjti/go-spancheck", - sha256 = "d8a4115c878fd382f434eb9cf74183cfa91b42b4f83a213f4d45499d852db49e", - strip_prefix = "github.com/jjti/go-spancheck@v0.6.1", + sha256 = "187ebe9dd66e096715bdb989bf60ddc87df773b4fa4f9c65df88177f14ba50c9", + strip_prefix = "github.com/jjti/go-spancheck@v0.6.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.1.zip", - "http://ats.apps.svc/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.2.zip", + "http://ats.apps.svc/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/jjti/go-spancheck/com_github_jjti_go_spancheck-v0.6.2.zip", ], ) go_repository( @@ -4957,13 +4879,13 @@ def go_deps(): name = "com_github_masterminds_semver_v3", build_file_proto_mode = "disable_global", importpath = "github.com/Masterminds/semver/v3", - sha256 = "d3e3b1dae669d44d9f92a314e02c3b2bbff2c5b2463f650cdbb7340f413e854b", - strip_prefix = "github.com/Masterminds/semver/v3@v3.2.1", + sha256 = "b492e8f6fa4c8240234a6d5095521f75d9e2e7c52672b90b5afde533281b540f", + strip_prefix = "github.com/Masterminds/semver/v3@v3.3.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.2.1.zip", - "http://ats.apps.svc/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.2.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.2.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/Masterminds/semver/v3/com_github_masterminds_semver_v3-v3.2.1.zip", + "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", ], ) go_repository( @@ -5282,13 +5204,13 @@ def go_deps(): name = "com_github_moricho_tparallel", build_file_proto_mode = "disable_global", importpath = "github.com/moricho/tparallel", - sha256 = "338b0f9ea839d5b8663a45b8b094bcfc22b5347cd3771cbe872de326e4d8ea9e", - strip_prefix = "github.com/moricho/tparallel@v0.3.1", + sha256 = "12699235938c6b9b55034d85b55e133677c81f99726276ac93c30cd541759f7a", + strip_prefix = "github.com/moricho/tparallel@v0.3.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.1.zip", - "http://ats.apps.svc/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.2.zip", + "http://ats.apps.svc/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/moricho/tparallel/com_github_moricho_tparallel-v0.3.2.zip", ], ) go_repository( @@ -5724,13 +5646,13 @@ def go_deps(): name = "com_github_pelletier_go_toml_v2", build_file_proto_mode = "disable_global", importpath = "github.com/pelletier/go-toml/v2", - sha256 = "8d724e35b485503810f866bca278d518e731713441e380634f6b33c27aefdf3e", - strip_prefix = "github.com/pelletier/go-toml/v2@v2.2.2", + sha256 = "a51f4dc7b62bd7c26b387d912dfae87ca1449082f26574c9f614ae640318b092", + strip_prefix = "github.com/pelletier/go-toml/v2@v2.2.3", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.2.zip", - "http://ats.apps.svc/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.3.zip", + "http://ats.apps.svc/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.3.zip", + "https://cache.hawkingrei.com/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.3.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/pelletier/go-toml/v2/com_github_pelletier_go_toml_v2-v2.2.3.zip", ], ) go_repository( @@ -5997,13 +5919,13 @@ def go_deps(): name = "com_github_polyfloyd_go_errorlint", build_file_proto_mode = "disable_global", importpath = "github.com/polyfloyd/go-errorlint", - sha256 = "bac1e1f85fcbbb7f62f3893247cbe88e0c7cc087ab86e06ee39e61ac9781c3dd", - strip_prefix = "github.com/polyfloyd/go-errorlint@v1.5.1", + sha256 = "95f0f04aeb20d56737e41e691191cb6ca2ace49fc16f47d4c519a5569f4ed49d", + strip_prefix = "github.com/polyfloyd/go-errorlint@v1.6.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.5.1.zip", - "http://ats.apps.svc/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.5.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.5.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.5.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.6.0.zip", + "http://ats.apps.svc/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.6.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.6.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/polyfloyd/go-errorlint/com_github_polyfloyd_go_errorlint-v1.6.0.zip", ], ) go_repository( @@ -6179,13 +6101,13 @@ def go_deps(): name = "com_github_quasilyte_go_ruleguard", build_file_proto_mode = "disable_global", importpath = "github.com/quasilyte/go-ruleguard", - sha256 = "7c3bf78f38153c5142a320272407b842a85c0b3d0791bcbb3c22597f6b562ef4", - strip_prefix = "github.com/quasilyte/go-ruleguard@v0.4.2", + sha256 = "1ff064af74cc9cf22b3ec3b1eb6d6a8a725df8cf2692cddf522694c652a7c6cd", + strip_prefix = "github.com/quasilyte/go-ruleguard@v0.4.3-0.20240823090925-0fe6f58b47b1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.2.zip", - "http://ats.apps.svc/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.3-0.20240823090925-0fe6f58b47b1.zip", + "http://ats.apps.svc/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.3-0.20240823090925-0fe6f58b47b1.zip", + "https://cache.hawkingrei.com/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.3-0.20240823090925-0fe6f58b47b1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/quasilyte/go-ruleguard/com_github_quasilyte_go_ruleguard-v0.4.3-0.20240823090925-0fe6f58b47b1.zip", ], ) go_repository( @@ -6240,6 +6162,19 @@ def go_deps(): "https://storage.googleapis.com/pingcapmirror/gomod/github.com/quasilyte/stdinfo/com_github_quasilyte_stdinfo-v0.0.0-20220114132959-f7386bf02567.zip", ], ) + go_repository( + name = "com_github_raeperd_recvcheck", + build_file_proto_mode = "disable_global", + importpath = "github.com/raeperd/recvcheck", + sha256 = "865384b04219bb139113a1108a467bc198b7a2dd02a8d830c4ab1a3abb0f4670", + strip_prefix = "github.com/raeperd/recvcheck@v0.1.2", + urls = [ + "http://bazel-cache.pingcap.net:8080/gomod/github.com/raeperd/recvcheck/com_github_raeperd_recvcheck-v0.1.2.zip", + "http://ats.apps.svc/gomod/github.com/raeperd/recvcheck/com_github_raeperd_recvcheck-v0.1.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/raeperd/recvcheck/com_github_raeperd_recvcheck-v0.1.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/raeperd/recvcheck/com_github_raeperd_recvcheck-v0.1.2.zip", + ], + ) go_repository( name = "com_github_remyoudompheng_bigfft", build_file_proto_mode = "disable_global", @@ -6348,13 +6283,13 @@ def go_deps(): name = "com_github_ryancurrah_gomodguard", build_file_proto_mode = "disable_global", importpath = "github.com/ryancurrah/gomodguard", - sha256 = "03930d9ec32fe7f11777dc352ef034f4c21bdb0d2915cc21777dca1a8e180a06", - strip_prefix = "github.com/ryancurrah/gomodguard@v1.3.2", + sha256 = "e4c7447d4f610e9538ec9cf9a64e23715e0c6616ac830b4b94f14352ad6d16f1", + strip_prefix = "github.com/ryancurrah/gomodguard@v1.3.5", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.2.zip", - "http://ats.apps.svc/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.5.zip", + "http://ats.apps.svc/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.5.zip", + "https://cache.hawkingrei.com/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.5.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/ryancurrah/gomodguard/com_github_ryancurrah_gomodguard-v1.3.5.zip", ], ) go_repository( @@ -6439,13 +6374,13 @@ def go_deps(): name = "com_github_sashamelentyev_usestdlibvars", build_file_proto_mode = "disable_global", importpath = "github.com/sashamelentyev/usestdlibvars", - sha256 = "483070c7a6bce16675617d59126190d4631b2b4207426467cc5c35c4bf0b21c9", - strip_prefix = "github.com/sashamelentyev/usestdlibvars@v1.25.0", + sha256 = "826b489964e6414462b60d7e11b48cbe61730bc787992d0b736ce71bd0ae6176", + strip_prefix = "github.com/sashamelentyev/usestdlibvars@v1.27.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.25.0.zip", - "http://ats.apps.svc/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.25.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.25.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.25.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.27.0.zip", + "http://ats.apps.svc/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.27.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.27.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sashamelentyev/usestdlibvars/com_github_sashamelentyev_usestdlibvars-v1.27.0.zip", ], ) go_repository( @@ -6478,13 +6413,13 @@ def go_deps(): name = "com_github_securego_gosec_v2", build_file_proto_mode = "disable_global", importpath = "github.com/securego/gosec/v2", - sha256 = "bd9297c05a481a794b03ea9029eebed96f9f72be9566d1e74929eae874c7e32d", - strip_prefix = "github.com/securego/gosec/v2@v2.20.1-0.20240525090044-5f0084eb01a9", + sha256 = "5817102bcf4de2c64fd908d2736fa75ce10373c1c23e8ade03d1ef823c645e17", + strip_prefix = "github.com/securego/gosec/v2@v2.21.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.20.1-0.20240525090044-5f0084eb01a9.zip", - "http://ats.apps.svc/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.20.1-0.20240525090044-5f0084eb01a9.zip", - "https://cache.hawkingrei.com/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.20.1-0.20240525090044-5f0084eb01a9.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.20.1-0.20240525090044-5f0084eb01a9.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.21.2.zip", + "http://ats.apps.svc/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.21.2.zip", + "https://cache.hawkingrei.com/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.21.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/securego/gosec/v2/com_github_securego_gosec_v2-v2.21.2.zip", ], ) go_repository( @@ -6543,13 +6478,13 @@ def go_deps(): name = "com_github_shirou_gopsutil_v3", build_file_proto_mode = "disable_global", importpath = "github.com/shirou/gopsutil/v3", - sha256 = "2bb2f820942ced0f23a05b929a6b7ffbac7e69b5bd2d3bea70d37e40a4d47e12", - strip_prefix = "github.com/shirou/gopsutil/v3@v3.24.4", + sha256 = "95ae6f59bf23d3400d96bdd3b8c84117effbd59cfab6ab37bd667d4b0ed79518", + strip_prefix = "github.com/shirou/gopsutil/v3@v3.24.5", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.4.zip", - "http://ats.apps.svc/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.4.zip", - "https://cache.hawkingrei.com/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.4.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.4.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.5.zip", + "http://ats.apps.svc/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.5.zip", + "https://cache.hawkingrei.com/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.5.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/shirou/gopsutil/v3/com_github_shirou_gopsutil_v3-v3.24.5.zip", ], ) go_repository( @@ -6673,13 +6608,13 @@ def go_deps(): name = "com_github_sivchari_tenv", build_file_proto_mode = "disable_global", importpath = "github.com/sivchari/tenv", - sha256 = "619d861bc16c8a9cb98fbe8f8f417847ffbc11c1f9c9eac359d43121537a166e", - strip_prefix = "github.com/sivchari/tenv@v1.7.1", + sha256 = "e261272a86e0924000db047c7dd6bd139cb16bfc0de928312f4de367dcc9641c", + strip_prefix = "github.com/sivchari/tenv@v1.10.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.7.1.zip", - "http://ats.apps.svc/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.7.1.zip", - "https://cache.hawkingrei.com/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.7.1.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.7.1.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.10.0.zip", + "http://ats.apps.svc/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.10.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.10.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sivchari/tenv/com_github_sivchari_tenv-v1.10.0.zip", ], ) go_repository( @@ -6699,13 +6634,13 @@ def go_deps(): name = "com_github_sonatard_noctx", build_file_proto_mode = "disable_global", importpath = "github.com/sonatard/noctx", - sha256 = "19ac5f6cd6f1f85beed1e5ce4cb126da2c546f0a82e3ced6d4d969f50129f7bc", - strip_prefix = "github.com/sonatard/noctx@v0.0.2", + sha256 = "dcf75523ef3bce910b33a3857419d67db4ac19e05ff82349c74912c1a92b7ce6", + strip_prefix = "github.com/sonatard/noctx@v0.1.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.0.2.zip", - "http://ats.apps.svc/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.0.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.0.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.0.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.1.0.zip", + "http://ats.apps.svc/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.1.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.1.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/sonatard/noctx/com_github_sonatard_noctx-v0.1.0.zip", ], ) go_repository( @@ -6751,13 +6686,13 @@ def go_deps(): name = "com_github_spf13_cobra", build_file_proto_mode = "disable_global", importpath = "github.com/spf13/cobra", - sha256 = "ba12924bbf9b40c3dfaddee45fb971a43908eb73fe0ffbbf7fd9e659e285c99c", - strip_prefix = "github.com/spf13/cobra@v1.8.0", + sha256 = "bf27a276f87257c93bc057309df30265a19beefc3d5fc887cbd8fc99ad35466a", + strip_prefix = "github.com/spf13/cobra@v1.8.1", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.0.zip", - "http://ats.apps.svc/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.1.zip", + "http://ats.apps.svc/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.1.zip", + "https://cache.hawkingrei.com/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.1.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/spf13/cobra/com_github_spf13_cobra-v1.8.1.zip", ], ) go_repository( @@ -6890,19 +6825,6 @@ def go_deps(): "https://storage.googleapis.com/pingcapmirror/gomod/github.com/subosito/gotenv/com_github_subosito_gotenv-v1.4.1.zip", ], ) - go_repository( - name = "com_github_t_yuki_gocover_cobertura", - build_file_proto_mode = "disable_global", - importpath = "github.com/t-yuki/gocover-cobertura", - sha256 = "ffaddbf6d6c7d7064b450b5e6a0baf841399baa442810bc3173c28aa5a765082", - strip_prefix = "github.com/t-yuki/gocover-cobertura@v0.0.0-20180217150009-aaee18c8195c", - urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/t-yuki/gocover-cobertura/com_github_t_yuki_gocover_cobertura-v0.0.0-20180217150009-aaee18c8195c.zip", - "http://ats.apps.svc/gomod/github.com/t-yuki/gocover-cobertura/com_github_t_yuki_gocover_cobertura-v0.0.0-20180217150009-aaee18c8195c.zip", - "https://cache.hawkingrei.com/gomod/github.com/t-yuki/gocover-cobertura/com_github_t_yuki_gocover_cobertura-v0.0.0-20180217150009-aaee18c8195c.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/t-yuki/gocover-cobertura/com_github_t_yuki_gocover_cobertura-v0.0.0-20180217150009-aaee18c8195c.zip", - ], - ) go_repository( name = "com_github_tdakkota_asciicheck", build_file_proto_mode = "disable_global", @@ -6972,13 +6894,13 @@ def go_deps(): name = "com_github_tetafro_godot", build_file_proto_mode = "disable_global", importpath = "github.com/tetafro/godot", - sha256 = "a262c88d1f320abf0f9027e90298b022469ed74103d9e4647e01c7fd90adce2f", - strip_prefix = "github.com/tetafro/godot@v1.4.16", + sha256 = "443697b69021d1bb44ee0d99466c15e9cd319f230e58a141363975b2376d8e7e", + strip_prefix = "github.com/tetafro/godot@v1.4.18", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.16.zip", - "http://ats.apps.svc/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.16.zip", - "https://cache.hawkingrei.com/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.16.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.16.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.18.zip", + "http://ats.apps.svc/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.18.zip", + "https://cache.hawkingrei.com/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.18.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tetafro/godot/com_github_tetafro_godot-v1.4.18.zip", ], ) go_repository( @@ -7115,13 +7037,13 @@ def go_deps(): name = "com_github_tomarrell_wrapcheck_v2", build_file_proto_mode = "disable_global", importpath = "github.com/tomarrell/wrapcheck/v2", - sha256 = "145860943176c4d444e15f8426df550d12aab7129c6fe0fc865b3fdf8dac7670", - strip_prefix = "github.com/tomarrell/wrapcheck/v2@v2.8.3", + sha256 = "22a31913f095a9beefdae6c7245954603284a793a0bf02801d335a1df6f5ba35", + strip_prefix = "github.com/tomarrell/wrapcheck/v2@v2.9.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.8.3.zip", - "http://ats.apps.svc/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.8.3.zip", - "https://cache.hawkingrei.com/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.8.3.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.8.3.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.9.0.zip", + "http://ats.apps.svc/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.9.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.9.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/tomarrell/wrapcheck/v2/com_github_tomarrell_wrapcheck_v2-v2.9.0.zip", ], ) go_repository( @@ -7232,13 +7154,13 @@ def go_deps(): name = "com_github_uudashr_gocognit", build_file_proto_mode = "disable_global", importpath = "github.com/uudashr/gocognit", - sha256 = "fc0b179859880b38cf2c356abac5261852afff67b7f61c8517a7f9b18f4a7c4e", - strip_prefix = "github.com/uudashr/gocognit@v1.1.2", + sha256 = "2ec47539013cc09a9c94eecd1f10521c4284d81c048ccb919e01c8cc1acc3d34", + strip_prefix = "github.com/uudashr/gocognit@v1.1.3", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.2.zip", - "http://ats.apps.svc/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.2.zip", - "https://cache.hawkingrei.com/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.2.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.2.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.3.zip", + "http://ats.apps.svc/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.3.zip", + "https://cache.hawkingrei.com/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.3.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/uudashr/gocognit/com_github_uudashr_gocognit-v1.1.3.zip", ], ) go_repository( @@ -7284,13 +7206,13 @@ def go_deps(): name = "com_github_valyala_quicktemplate", build_file_proto_mode = "disable_global", importpath = "github.com/valyala/quicktemplate", - sha256 = "047e3ef69c9088bc3c91ca3824c00a946d26f25d3825069c4046c927767d0052", - strip_prefix = "github.com/valyala/quicktemplate@v1.7.0", + sha256 = "173a41cc747e909777478e88d77a3e2db0cb1e85c274571a737d22a74602d716", + strip_prefix = "github.com/valyala/quicktemplate@v1.8.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.7.0.zip", - "http://ats.apps.svc/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.7.0.zip", - "https://cache.hawkingrei.com/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.7.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.7.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.8.0.zip", + "http://ats.apps.svc/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.8.0.zip", + "https://cache.hawkingrei.com/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.8.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/github.com/valyala/quicktemplate/com_github_valyala_quicktemplate-v1.8.0.zip", ], ) go_repository( @@ -9962,13 +9884,13 @@ def go_deps(): name = "org_go_simpler_sloglint", build_file_proto_mode = "disable_global", importpath = "go-simpler.org/sloglint", - sha256 = "306a4013808494afa314378fb0d91f5e8cb0070e456b593622a0dd8ab154731f", - strip_prefix = "go-simpler.org/sloglint@v0.7.0", + sha256 = "3c82534ba2bac463c0f965046f08e06b435cc51254dc2a44260ac30ac462493f", + strip_prefix = "go-simpler.org/sloglint@v0.7.2", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.0.zip", - "http://ats.apps.svc/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.0.zip", - "https://cache.hawkingrei.com/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.2.zip", + "http://ats.apps.svc/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.2.zip", + "https://cache.hawkingrei.com/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.2.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/go-simpler.org/sloglint/org_go_simpler_sloglint-v0.7.2.zip", ], ) go_repository( @@ -10092,26 +10014,26 @@ def go_deps(): name = "org_golang_x_crypto", build_file_proto_mode = "disable_global", importpath = "golang.org/x/crypto", - sha256 = "c724b619b457bb1c445a39541449b1348eb3851323a29d2c313ad0139634d0a5", - strip_prefix = "golang.org/x/crypto@v0.27.0", + sha256 = "959acbe3514430c2c009dc93f27e41ddad4fee178a4c680c753bc09b5d2e77d0", + strip_prefix = "golang.org/x/crypto@v0.28.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.27.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.27.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.27.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.27.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.28.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.28.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.28.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.28.0.zip", ], ) go_repository( name = "org_golang_x_exp", build_file_proto_mode = "disable_global", importpath = "golang.org/x/exp", - sha256 = "288485fe27be085eec548ea0184770b5108fdc6a19caff295a09c80262efdade", - strip_prefix = "golang.org/x/exp@v0.0.0-20240404231335-c0f41cb1a7a0", + sha256 = "447a436882177a2a9fc281116f1858d6e0533c790a90f55cf3a64f1cafb752c6", + strip_prefix = "golang.org/x/exp@v0.0.0-20240909161429-701f63a606c0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240404231335-c0f41cb1a7a0.zip", - "http://ats.apps.svc/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240404231335-c0f41cb1a7a0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240404231335-c0f41cb1a7a0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240404231335-c0f41cb1a7a0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240909161429-701f63a606c0.zip", + "http://ats.apps.svc/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240909161429-701f63a606c0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240909161429-701f63a606c0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/exp/org_golang_x_exp-v0.0.0-20240909161429-701f63a606c0.zip", ], ) go_repository( @@ -10170,26 +10092,26 @@ def go_deps(): name = "org_golang_x_mod", build_file_proto_mode = "disable_global", importpath = "golang.org/x/mod", - sha256 = "3c3528c39639b7cd699c121c100ddb71ab49f94bff257a4a3935e3ae9e8571fc", - strip_prefix = "golang.org/x/mod@v0.20.0", + sha256 = "e736e1acca78c9550fa78f54de78d9cf15d5db1ca7d92537900c8591e6ab79c0", + strip_prefix = "golang.org/x/mod@v0.21.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/mod/org_golang_x_mod-v0.20.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/mod/org_golang_x_mod-v0.20.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/mod/org_golang_x_mod-v0.20.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/mod/org_golang_x_mod-v0.20.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/mod/org_golang_x_mod-v0.21.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/mod/org_golang_x_mod-v0.21.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/mod/org_golang_x_mod-v0.21.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/mod/org_golang_x_mod-v0.21.0.zip", ], ) go_repository( name = "org_golang_x_net", build_file_proto_mode = "disable_global", importpath = "golang.org/x/net", - sha256 = "fec08ca53c4f3ddb0a81a0bfed2f7d36a6b2867d25380e4cc021c746fe4b722f", - strip_prefix = "golang.org/x/net@v0.29.0", + sha256 = "c357b779cdc08d0952f7bad4c45ce84223b7c6005d775822a17901ae8f65bbba", + strip_prefix = "golang.org/x/net@v0.30.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.29.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.29.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.29.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.29.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/net/org_golang_x_net-v0.30.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/net/org_golang_x_net-v0.30.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/net/org_golang_x_net-v0.30.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/net/org_golang_x_net-v0.30.0.zip", ], ) go_repository( @@ -10235,13 +10157,13 @@ def go_deps(): name = "org_golang_x_sys", build_file_proto_mode = "disable_global", importpath = "golang.org/x/sys", - sha256 = "95e485046cac79d164d4d35a13e93b2a866a1ac2148184c37ca71514ddd94a52", - strip_prefix = "golang.org/x/sys@v0.25.0", + sha256 = "f44842acff792af010dcb5a24308b72272ebd57c74e00d5f530c9e5d55b86979", + strip_prefix = "golang.org/x/sys@v0.26.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sys/org_golang_x_sys-v0.25.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/sys/org_golang_x_sys-v0.25.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/sys/org_golang_x_sys-v0.25.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sys/org_golang_x_sys-v0.25.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/sys/org_golang_x_sys-v0.26.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/sys/org_golang_x_sys-v0.26.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/sys/org_golang_x_sys-v0.26.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/sys/org_golang_x_sys-v0.26.0.zip", ], ) go_repository( @@ -10261,26 +10183,26 @@ def go_deps(): name = "org_golang_x_term", build_file_proto_mode = "disable_global", importpath = "golang.org/x/term", - sha256 = "80b2b247641ca1b8f54769de20d4d6a0c6861de57a3bc1b31e8432a2a7483ab3", - strip_prefix = "golang.org/x/term@v0.24.0", + sha256 = "e058796198c690102b79367c0501a66a4867c323aee42b6315726de0ac015676", + strip_prefix = "golang.org/x/term@v0.25.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/term/org_golang_x_term-v0.24.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/term/org_golang_x_term-v0.24.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/term/org_golang_x_term-v0.24.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/term/org_golang_x_term-v0.24.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/term/org_golang_x_term-v0.25.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/term/org_golang_x_term-v0.25.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/term/org_golang_x_term-v0.25.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/term/org_golang_x_term-v0.25.0.zip", ], ) go_repository( name = "org_golang_x_text", build_file_proto_mode = "disable_global", importpath = "golang.org/x/text", - sha256 = "09da08281c6854e695cdffb25569df0abf53fe545c6610be09d58294728e81e5", - strip_prefix = "golang.org/x/text@v0.18.0", + sha256 = "37f9f40b6c3c56e079684d612439b61ce4e891c3cea32298fbab53a1cac47c35", + strip_prefix = "golang.org/x/text@v0.19.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.18.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.18.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.18.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.18.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/text/org_golang_x_text-v0.19.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/text/org_golang_x_text-v0.19.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/text/org_golang_x_text-v0.19.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/text/org_golang_x_text-v0.19.0.zip", ], ) go_repository( @@ -10300,13 +10222,13 @@ def go_deps(): name = "org_golang_x_tools", build_file_proto_mode = "disable_global", importpath = "golang.org/x/tools", - sha256 = "92607be1cacf4647fd31b19ee64b1a7c198178f1005c75371e38e7b08fb138e7", - strip_prefix = "golang.org/x/tools@v0.24.0", + sha256 = "2e7f4eff4d5d5834c92f8aa59e44a889af5795c3fa8d1e146fc8224c778aefb5", + strip_prefix = "golang.org/x/tools@v0.26.0", urls = [ - "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/tools/org_golang_x_tools-v0.24.0.zip", - "http://ats.apps.svc/gomod/golang.org/x/tools/org_golang_x_tools-v0.24.0.zip", - "https://cache.hawkingrei.com/gomod/golang.org/x/tools/org_golang_x_tools-v0.24.0.zip", - "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/org_golang_x_tools-v0.24.0.zip", + "http://bazel-cache.pingcap.net:8080/gomod/golang.org/x/tools/org_golang_x_tools-v0.26.0.zip", + "http://ats.apps.svc/gomod/golang.org/x/tools/org_golang_x_tools-v0.26.0.zip", + "https://cache.hawkingrei.com/gomod/golang.org/x/tools/org_golang_x_tools-v0.26.0.zip", + "https://storage.googleapis.com/pingcapmirror/gomod/golang.org/x/tools/org_golang_x_tools-v0.26.0.zip", ], ) go_repository( diff --git a/Dockerfile b/Dockerfile index 72ed515137983..75705354e71ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ # production environment, please refer to https://github.com/PingCAP-QE/artifacts/blob/main/dockerfiles/cd/builders/tidb/Dockerfile. # Builder image -FROM golang:1.21 as builder +FROM golang:1.23 as builder WORKDIR /tidb COPY . . diff --git a/Dockerfile.enterprise b/Dockerfile.enterprise index 5122580c718ed..77e751f4d0380 100644 --- a/Dockerfile.enterprise +++ b/Dockerfile.enterprise @@ -14,7 +14,7 @@ # The current dockerfile is only used for development purposes. # Builder image -FROM golang:1.21 as builder +FROM golang:1.23 as builder WORKDIR /tidb COPY . . diff --git a/WORKSPACE b/WORKSPACE index 7a28e83bfd4fd..fbc5b6484fb9d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -85,7 +85,7 @@ go_download_sdk( "https://mirrors.aliyun.com/golang/{}", "https://dl.google.com/go/{}", ], - version = "1.21.13", + version = "1.23.2", ) go_register_toolchains( diff --git a/br/pkg/restore/internal/prealloc_table_id/alloc.go b/br/pkg/restore/internal/prealloc_table_id/alloc.go index e224f721afccb..6e389c9685497 100644 --- a/br/pkg/restore/internal/prealloc_table_id/alloc.go +++ b/br/pkg/restore/internal/prealloc_table_id/alloc.go @@ -43,23 +43,23 @@ func New(tables []*metautil.Table) *PreallocIDs { } } - max := int64(0) + maxv := int64(0) for _, t := range tables { - if t.Info.ID > max && t.Info.ID < insaneTableIDThreshold { - max = t.Info.ID + if t.Info.ID > maxv && t.Info.ID < insaneTableIDThreshold { + maxv = t.Info.ID } if t.Info.Partition != nil && t.Info.Partition.Definitions != nil { for _, part := range t.Info.Partition.Definitions { - if part.ID > max && part.ID < insaneTableIDThreshold { - max = part.ID + if part.ID > maxv && part.ID < insaneTableIDThreshold { + maxv = part.ID } } } } return &PreallocIDs{ - end: max + 1, + end: maxv + 1, allocedFrom: math.MaxInt64, } diff --git a/build/image/base b/build/image/base index de477e68b6095..2624e2d2e7f16 100644 --- a/build/image/base +++ b/build/image/base @@ -12,33 +12,66 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM hub.pingcap.net/jenkins/centos7_jenkins - -USER root -WORKDIR /root - -ENV GOLANG_VERSION 1.21.13 -ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz -ENV GOLANG_DOWNLOAD_SHA256 b3075ae1ce5dab85f89bc7905d1632de23ca196bd8336afd93fa97434cfa55ae -ENV GOPATH /go -ENV GOROOT /usr/local/go -ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH -ADD https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-linux-x86_64 /usr/bin/bazel -ADD https://uploader.codecov.io/latest/linux/codecov /usr/bin/codecov -RUN curl https://setup.ius.io | sh || true && \ - chmod u+x /usr/bin/bazel && yum update -y && \ - yum install -y supervisor tree libcurl-devel gettext autoconf python-pip python3-pip patch git wget gcc python autoconf make curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-CPAN perl-devel && \ - git clone --depth=1 --branch=v2.37.2 https://github.com/git/git && cd git && yum remove -y git && make configure && ./configure --prefix=/usr/local CFLAGS="-std=gnu99" && make -j16 install && cd .. && rm -rf git && \ - pip3 install s3cmd requests && pip3 install requests && \ - curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ - && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ - && tar -C /usr/local -xzf golang.tar.gz \ - && rm golang.tar.gz && \ - mkdir /go && chown jenkins:jenkins /go && \ - curl -fsSL "http://pingcap-dev.hk.ufileos.com/jenkins/jenkins-slave-docker-sqllogictest.tar.gz" | tar xz -C "/git" \ - && chown -R jenkins:jenkins /git && \ - chown jenkins:jenkins /usr/bin/bazel && \ - chown jenkins:jenkins /usr/bin/codecov && \ - chmod +x /usr/bin/codecov -USER jenkins -WORKDIR /home/jenkins +# Base image +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 - \ + && chmod +x mariadb_repo_setup \ + && ./mariadb_repo_setup \ + && rm mariadb_repo_setup + +# install OS packages. +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf upgrade-minimal -y && \ + dnf install -y make git gcc wget unzip psmisc lsof jq MariaDB-client + +# install golang toolchain +# renovate: datasource=docker depName=golang +ARG GOLANG_VERSION=1.23.2 +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 +LABEL go-version="${GOLANG_VERSION}" + +# install rust toolchain +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s - -y --default-toolchain nightly +ENV PATH /root/.cargo/bin:$PATH + +# install nodejs toolchain +ARG NODE_VERSION=18 +RUN curl -fsSL https://rpm.nodesource.com/setup_${NODE_VERSION}.x | bash - \ + && dnf install -y nsolid \ + && npm install -g yarn@1.22.22 pnpm@8.15.9 + +#### install java tool chains: open-jdk, gradle, apache-maven +# -> open-jdk +ARG JAVA_VER=17 +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf install -y java-${JAVA_VER}-openjdk-devel +ENV JAVA_HOME=/usr/lib/jvm/jre-openjdk + +# -> gradle +ARG GRADLE_VER=7.4.2 +RUN wget https://services.gradle.org/distributions/gradle-${GRADLE_VER}-bin.zip && \ + unzip gradle-${GRADLE_VER}-bin.zip -d /opt && \ + rm gradle-${GRADLE_VER}-bin.zip +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 +RUN chmod +x /usr/bin/bazel + +# codecov tool +# renovate: datasource=github-tags depName=codecov/uploader +ARG CODECOV_VERSION=v0.8.0 +RUN folder=$([ "$(arch)" = "x86_64" ] && echo linux || echo aarch64); \ + curl -fsSL https://uploader.codecov.io/${CODECOV_VERSION}/${folder}/codecov -o /usr/local/bin/codecov && \ + chmod +x /usr/local/bin/codecov + +# oras tool +# renovate: datasource=github-tags depName=oras-project/oras +COPY --from=bitnami/oras:1.2.0 /oras /usr/local/bin/oras diff --git a/build/image/centos7_jenkins b/build/image/centos7_jenkins index 34c7b50f92213..a1e980f086b4c 100644 --- a/build/image/centos7_jenkins +++ b/build/image/centos7_jenkins @@ -12,12 +12,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM hub.pingcap.net/wangweizhen/base_image:go121020230809 +FROM hub.pingcap.net/wangweizhen/base_image:go12320241009 +ENV GOPATH /go +ENV GOROOT /usr/local/go +ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH USER root WORKDIR /root COPY .ci_bazel /data/bazel -RUN mkdir -p /data/tikv1 /data/tikv2 /data/tikv3 /data/pd && \ - chown -R jenkins:jenkins /data +# create user jenkins and add it to sudoers. +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf install -y sudo +RUN groupadd -g 1000 jenkins && \ + useradd -u 1000 -g 1000 -m -s /bin/bash jenkins && \ + echo "jenkins:password" | chpasswd && \ + echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +RUN mkdir -p /data/tikv1 /data/tikv2 /data/tikv3 /data/pd && \ + mkdir /go && chown jenkins:jenkins /go && \ + chown -R jenkins:jenkins /data && \ + chown jenkins:jenkins /usr/bin/bazel +# Switch to the non-root user jenkins and set the working directory USER jenkins WORKDIR /home/jenkins RUN go install github.com/hawkingrei/bazel_collect@latest && \ diff --git a/build/image/parser_test b/build/image/parser_test index 6acd458b58efc..98a572c9e9efb 100644 --- a/build/image/parser_test +++ b/build/image/parser_test @@ -14,7 +14,7 @@ FROM rockylinux:9 -ENV GOLANG_VERSION 1.21.13 +ENV GOLANG_VERSION 1.23.2 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/cmd/benchdb/main.go b/cmd/benchdb/main.go index 10438ac5726a8..8d95bee890ab9 100644 --- a/cmd/benchdb/main.go +++ b/cmd/benchdb/main.go @@ -201,8 +201,8 @@ func (ut *benchDB) truncateTable() { func (ut *benchDB) runCountTimes(name string, count int, f func()) { var ( sum, first, last time.Duration - min = time.Minute - max = time.Nanosecond + minv = time.Minute + maxv = time.Nanosecond ) cLogf("%s started", name) for i := 0; i < count; i++ { @@ -213,16 +213,16 @@ func (ut *benchDB) runCountTimes(name string, count int, f func()) { first = dur } last = dur - if dur < min { - min = dur + if dur < minv { + minv = dur } - if dur > max { - max = dur + if dur > maxv { + maxv = dur } sum += dur } cLogf("%s done, avg %s, count %d, sum %s, first %s, last %s, max %s, min %s\n\n", - name, sum/time.Duration(count), count, sum, first, last, max, min) + name, sum/time.Duration(count), count, sum, first, last, maxv, minv) } // #nosec G404 diff --git a/cmd/importer/data.go b/cmd/importer/data.go index b549ad6ef445e..17d671fef24e2 100644 --- a/cmd/importer/data.go +++ b/cmd/importer/data.go @@ -43,7 +43,7 @@ func newDatum() *datum { return &datum{step: 1, repeats: 1, remains: 1, probability: 100} } -func (d *datum) setInitInt64Value(min int64, max int64) { +func (d *datum) setInitInt64Value(minv int64, maxv int64) { d.Lock() defer d.Unlock() @@ -51,11 +51,11 @@ func (d *datum) setInitInt64Value(min int64, max int64) { return } - d.minIntValue = min - d.maxIntValue = max + d.minIntValue = minv + d.maxIntValue = maxv d.useRange = true if d.step < 0 { - d.intValue = (min + max) / 2 + d.intValue = (minv + maxv) / 2 } d.init = true diff --git a/cmd/importer/db.go b/cmd/importer/db.go index 786cf6cdbea29..55d70bcad14bd 100644 --- a/cmd/importer/db.go +++ b/cmd/importer/db.go @@ -29,23 +29,23 @@ import ( "go.uber.org/zap" ) -func intRangeValue(column *column, min int64, max int64) (int64, int64) { +func intRangeValue(column *column, minv, maxv int64) (int64, int64) { var err error if len(column.min) > 0 { - min, err = strconv.ParseInt(column.min, 10, 64) + minv, err = strconv.ParseInt(column.min, 10, 64) if err != nil { log.Fatal(err.Error()) } if len(column.max) > 0 { - max, err = strconv.ParseInt(column.max, 10, 64) + maxv, err = strconv.ParseInt(column.max, 10, 64) if err != nil { log.Fatal(err.Error()) } } } - return min, max + return minv, maxv } func randStringValue(column *column, n int) string { @@ -62,7 +62,7 @@ func randStringValue(column *column, n int) string { return randString(randInt(1, n)) } -func randInt64Value(column *column, min int64, max int64) int64 { +func randInt64Value(column *column, minv, maxv int64) int64 { if column.hist != nil { return column.hist.randInt() } @@ -75,13 +75,13 @@ func randInt64Value(column *column, min int64, max int64) int64 { return data } - min, max = intRangeValue(column, min, max) - return randInt64(min, max) + minv, maxv = intRangeValue(column, minv, maxv) + return randInt64(minv, maxv) } -func nextInt64Value(column *column, min int64, max int64) int64 { - min, max = intRangeValue(column, min, max) - column.data.setInitInt64Value(min, max) +func nextInt64Value(column *column, minv int64, maxv int64) int64 { + minv, maxv = intRangeValue(column, minv, maxv) + column.data.setInitInt64Value(minv, maxv) return column.data.nextInt64() } diff --git a/cmd/importer/rand.go b/cmd/importer/rand.go index 1adab0f0dbce6..dff1b27dea9e8 100644 --- a/cmd/importer/rand.go +++ b/cmd/importer/rand.go @@ -38,12 +38,12 @@ const ( letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits ) -func randInt(min int, max int) int { - return min + rand.Intn(max-min+1) +func randInt(minv, maxv int) int { + return minv + rand.Intn(maxv-minv+1) } -func randInt64(min int64, max int64) int64 { - return min + rand.Int63n(max-min+1) +func randInt64(minv, maxv int64) int64 { + return minv + rand.Int63n(maxv-minv+1) } // reference: http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang @@ -70,24 +70,24 @@ func randDate(col *column) string { return col.hist.randDate("DAY", "%Y-%m-%d", dateFormat) } - min, max := col.min, col.max - if min == "" { + minv, maxv := col.min, col.max + if minv == "" { year := time.Now().Year() month := randInt(1, 12) day := randInt(1, 28) return fmt.Sprintf("%04d-%02d-%02d", year, month, day) } - minTime, err := time.Parse(dateFormat, min) + minTime, err := time.Parse(dateFormat, minv) if err != nil { log.Warn("parse min date failed", zap.Error(err)) } - if max == "" { + if maxv == "" { t := minTime.Add(time.Duration(randInt(0, 365)) * 24 * time.Hour) // nolint: durationcheck return fmt.Sprintf("%04d-%02d-%02d", t.Year(), t.Month(), t.Day()) } - maxTime, err := time.Parse(dateFormat, max) + maxTime, err := time.Parse(dateFormat, maxv) if err != nil { log.Warn("parse max date failed", zap.Error(err)) } @@ -100,21 +100,21 @@ func randTime(col *column) string { if col.hist != nil { return col.hist.randDate("SECOND", "%H:%i:%s", timeFormat) } - min, max := col.min, col.max - if min == "" || max == "" { + minv, maxv := col.min, col.max + if minv == "" || maxv == "" { hour := randInt(0, 23) - min := randInt(0, 59) + minute := randInt(0, 59) sec := randInt(0, 59) - return fmt.Sprintf("%02d:%02d:%02d", hour, min, sec) + return fmt.Sprintf("%02d:%02d:%02d", hour, minute, sec) } - minTime, err := time.Parse(timeFormat, min) + minTime, err := time.Parse(timeFormat, minv) if err != nil { - log.Warn("parse min time failed", zap.Error(err)) + log.Warn("parse minv time failed", zap.Error(err)) } - maxTime, err := time.Parse(timeFormat, max) + maxTime, err := time.Parse(timeFormat, maxv) if err != nil { - log.Warn("parse max time failed", zap.Error(err)) + log.Warn("parse maxv time failed", zap.Error(err)) } seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) @@ -125,29 +125,29 @@ func randTimestamp(col *column) string { if col.hist != nil { return col.hist.randDate("SECOND", "%Y-%m-%d %H:%i:%s", dateTimeFormat) } - min, max := col.min, col.max - if min == "" { + minv, maxv := col.min, col.max + if minv == "" { year := time.Now().Year() month := randInt(1, 12) day := randInt(1, 28) hour := randInt(0, 23) - min := randInt(0, 59) + minute := randInt(0, 59) sec := randInt(0, 59) - return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, min, sec) + return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, sec) } - minTime, err := time.Parse(dateTimeFormat, min) + minTime, err := time.Parse(dateTimeFormat, minv) if err != nil { - log.Warn("parse min timestamp failed", zap.Error(err)) + log.Warn("parse minv timestamp failed", zap.Error(err)) } - if max == "" { + if maxv == "" { t := minTime.Add(time.Duration(randInt(0, 365)) * 24 * time.Hour) // nolint: durationcheck return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) } - maxTime, err := time.Parse(dateTimeFormat, max) + maxTime, err := time.Parse(dateTimeFormat, maxv) if err != nil { - log.Warn("parse max timestamp failed", zap.Error(err)) + log.Warn("parse maxv timestamp failed", zap.Error(err)) } seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) @@ -158,18 +158,18 @@ func randYear(col *column) string { if col.hist != nil { return col.hist.randDate("YEAR", "%Y", yearFormat) } - min, max := col.min, col.max - if min == "" || max == "" { + minv, maxv := col.min, col.max + if minv == "" || maxv == "" { return fmt.Sprintf("%04d", time.Now().Year()-randInt(0, 10)) } - minTime, err := time.Parse(yearFormat, min) + minTime, err := time.Parse(yearFormat, minv) if err != nil { - log.Warn("parse min year failed", zap.Error(err)) + log.Warn("parse minv year failed", zap.Error(err)) } - maxTime, err := time.Parse(yearFormat, max) + maxTime, err := time.Parse(yearFormat, maxv) if err != nil { - log.Warn("parse max year failed", zap.Error(err)) + log.Warn("parse maxv year failed", zap.Error(err)) } seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) diff --git a/dumpling/export/dump.go b/dumpling/export/dump.go index 0d94c814eaa77..2ec30eb187204 100644 --- a/dumpling/export/dump.go +++ b/dumpling/export/dump.go @@ -773,24 +773,24 @@ func (d *Dumper) concurrentDumpTable(tctx *tcontext.Context, conn *BaseConn, met return d.dumpWholeTableDirectly(tctx, meta, taskChan, "", orderByClause, 0, 1) } - min, max, err := d.selectMinAndMaxIntValue(tctx, conn, db, tbl, field) + minv, maxv, err := d.selectMinAndMaxIntValue(tctx, conn, db, tbl, field) if err != nil { tctx.L().Info("fallback to sequential dump due to cannot get bounding values. This won't influence the whole dump process", log.ShortError(err)) return d.dumpWholeTableDirectly(tctx, meta, taskChan, "", orderByClause, 0, 1) } tctx.L().Debug("get int bounding values", - zap.String("lower", min.String()), - zap.String("upper", max.String())) + zap.String("lower", minv.String()), + zap.String("upper", maxv.String())) // every chunk would have eventual adjustments estimatedChunks := count / conf.Rows - estimatedStep := new(big.Int).Sub(max, min).Uint64()/estimatedChunks + 1 + estimatedStep := new(big.Int).Sub(maxv, minv).Uint64()/estimatedChunks + 1 bigEstimatedStep := new(big.Int).SetUint64(estimatedStep) - cutoff := new(big.Int).Set(min) + cutoff := new(big.Int).Set(minv) totalChunks := estimatedChunks if estimatedStep == 1 { - totalChunks = new(big.Int).Sub(max, min).Uint64() + 1 + totalChunks = new(big.Int).Sub(maxv, minv).Uint64() + 1 } selectField, selectLen := meta.SelectedField(), meta.SelectedLen() @@ -800,7 +800,7 @@ func (d *Dumper) concurrentDumpTable(tctx *tcontext.Context, conn *BaseConn, met if conf.Where == "" { nullValueCondition = fmt.Sprintf("`%s` IS NULL OR ", escapeString(field)) } - for max.Cmp(cutoff) >= 0 { + for maxv.Cmp(cutoff) >= 0 { nextCutOff := new(big.Int).Add(cutoff, bigEstimatedStep) where := fmt.Sprintf("%s(`%s` >= %d AND `%s` < %d)", nullValueCondition, escapeString(field), cutoff, escapeString(field), nextCutOff) query := buildSelectQuery(db, tbl, selectField, "", buildWhereCondition(conf, where), orderByClause) @@ -847,23 +847,23 @@ func (d *Dumper) selectMinAndMaxIntValue(tctx *tcontext.Context, conn *BaseConn, return err }, func() {}, query) if err != nil { - return zero, zero, errors.Annotatef(err, "can't get min/max values to split chunks, query: %s", query) + return zero, zero, errors.Annotatef(err, "can't get min/maxv values to split chunks, query: %s", query) } if !smax.Valid || !smin.Valid { // found no data return zero, zero, errors.Errorf("no invalid min/max value found in query %s", query) } - max := new(big.Int) - min := new(big.Int) + maxv := new(big.Int) + minv := new(big.Int) var ok bool - if max, ok = max.SetString(smax.String, 10); !ok { + if maxv, ok = maxv.SetString(smax.String, 10); !ok { return zero, zero, errors.Errorf("fail to convert max value %s in query %s", smax.String, query) } - if min, ok = min.SetString(smin.String, 10); !ok { + if minv, ok = minv.SetString(smin.String, 10); !ok { return zero, zero, errors.Errorf("fail to convert min value %s in query %s", smin.String, query) } - return min, max, nil + return minv, maxv, nil } func (d *Dumper) concurrentDumpTiDBTables(tctx *tcontext.Context, conn *BaseConn, meta TableMeta, taskChan chan<- Task) error { diff --git a/errors.toml b/errors.toml index b30f404faa03a..f961d26c4a265 100644 --- a/errors.toml +++ b/errors.toml @@ -1413,7 +1413,7 @@ Invalid storage current version: %d ["ddl:8210"] error = ''' -Invalid %!s(MISSING) state: %!v(MISSING) +Invalid %s state: %v ''' ["ddl:8211"] diff --git a/go.mod b/go.mod index d15640f4fc50a..94c9a8c2137f6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/pingcap/tidb -go 1.21 +go 1.23 require ( cloud.google.com/go/kms v1.15.7 @@ -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.0 + github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c 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 @@ -16,7 +16,7 @@ require ( github.com/apache/skywalking-eyes v0.4.0 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 github.com/ashanbrown/makezero v1.1.1 - github.com/aws/aws-sdk-go v1.50.0 + github.com/aws/aws-sdk-go v1.55.5 github.com/bazelbuild/buildtools v0.0.0-20230926111657-7d855c59baeb github.com/bazelbuild/rules_go v0.42.1-0.20231101215950-df20c987afcb github.com/bits-and-blooms/bitset v1.14.3 @@ -31,7 +31,7 @@ require ( github.com/coocood/freecache v1.2.1 github.com/coreos/go-semver v0.3.1 github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 - github.com/daixiang0/gci v0.13.4 + github.com/daixiang0/gci v0.13.5 github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37 github.com/dgraph-io/ristretto v0.1.1 github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 @@ -49,17 +49,17 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.4 github.com/golang/snappy v0.0.4 - github.com/golangci/gofmt v0.0.0-20231019111953-be8c47862aaa - github.com/golangci/golangci-lint v1.59.0 + github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 + github.com/golangci/golangci-lint v1.61.1-0.20240915150923-7187c89d4091 github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb - github.com/golangci/misspell v0.5.1 + github.com/golangci/misspell v0.6.0 github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 github.com/google/btree v1.1.2 - github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 + github.com/google/pprof v0.0.0-20241001023024-f4c0cfd0cf1d github.com/google/skylark v0.0.0-20181101142754-a5f7082aabed github.com/google/uuid v1.6.0 github.com/gordonklaus/ineffassign v0.1.0 - github.com/gorilla/mux v1.8.0 + github.com/gorilla/mux v1.8.1 github.com/gostaticanalysis/forcetypeassert v0.1.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/hashicorp/go-version v1.7.0 @@ -98,10 +98,10 @@ require ( 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/shirou/gopsutil/v3 v3.24.4 + github.com/shirou/gopsutil/v3 v3.24.5 github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0 github.com/soheilhy/cmux v0.1.5 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/spkg/bom v1.0.0 github.com/stathat/consistent v1.0.0 @@ -130,21 +130,21 @@ require ( go.uber.org/mock v0.4.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 - golang.org/x/net v0.29.0 + golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 + golang.org/x/net v0.30.0 golang.org/x/oauth2 v0.21.0 golang.org/x/sync v0.8.0 - golang.org/x/sys v0.25.0 - golang.org/x/term v0.24.0 - golang.org/x/text v0.18.0 + golang.org/x/sys v0.26.0 + golang.org/x/term v0.25.0 + golang.org/x/text v0.19.0 golang.org/x/time v0.5.0 - golang.org/x/tools v0.24.0 + golang.org/x/tools v0.26.0 google.golang.org/api v0.169.0 google.golang.org/grpc v1.63.2 gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/mysql v1.5.7 gorm.io/gorm v1.25.11 - honnef.co/go/tools v0.4.7 + honnef.co/go/tools v0.5.1 k8s.io/api v0.28.6 sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 @@ -181,7 +181,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.2.1 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // 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 @@ -298,9 +298,9 @@ 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.27.0 // indirect + golang.org/x/crypto v0.28.0 // indirect golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect - golang.org/x/mod v0.20.0 // indirect + golang.org/x/mod v0.21.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect diff --git a/go.sum b/go.sum index 05d98bb1b4d10..b11955c76f01e 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,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.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +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/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= @@ -76,8 +76,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.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= -github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +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/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= @@ -118,8 +118,8 @@ github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvx github.com/aws/aws-sdk-go v1.30.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.204/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.44.256/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.50.0 h1:HBtrLeO+QyDKnc3t1+5DR1RxodOHCGr8ZcrHudpv7jI= -github.com/aws/aws-sdk-go v1.50.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/bazelbuild/buildtools v0.0.0-20230926111657-7d855c59baeb h1:4k69c5E7Sa7jmNtv9itBHYA4Z5pfurInuRrtgohxZeA= github.com/bazelbuild/buildtools v0.0.0-20230926111657-7d855c59baeb/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo= github.com/bazelbuild/rules_go v0.42.1-0.20231101215950-df20c987afcb h1:CPn7VHaV3czTgk4LdEO+Od5DyYb6HXLL5CUIPignRLE= @@ -199,12 +199,12 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw= -github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= +github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= +github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37 h1:X6mKGhCFOxrKeeHAjv/3UvT6e5RRxW6wRdlqlV6/H4w= github.com/danjacques/gofslock v0.0.0-20191023191349-0a45f885bc37/go.mod h1:DC3JtzuG7kxMvJ6dZmf2ymjNyoXwgtklr7FN+Um2B0U= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -360,14 +360,14 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/gofmt v0.0.0-20231019111953-be8c47862aaa h1:L0Zq43Px2HrLroRKEgfCsQLMJUkjskJBB1kd1Zjcvvc= -github.com/golangci/gofmt v0.0.0-20231019111953-be8c47862aaa/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= -github.com/golangci/golangci-lint v1.59.0 h1:st69YDnAH/v2QXDcgUaZ0seQajHScPALBVkyitYLXEk= -github.com/golangci/golangci-lint v1.59.0/go.mod h1:QNA32UWdUdHXnu+Ap5/ZU4WVwyp2tL94UxEXrSErjg0= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME= +github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE= +github.com/golangci/golangci-lint v1.61.1-0.20240915150923-7187c89d4091 h1:QOO0qQ6PJxmQgr1J4WfUrMvwXclzhXsKTaLjRflOU7U= +github.com/golangci/golangci-lint v1.61.1-0.20240915150923-7187c89d4091/go.mod h1:PRvTpn+9dXYfWhsJX3OQ+RzzXBkzJjqkux72cKQECGs= github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb h1:Bi7BYmZVg4C+mKGi8LeohcP2GGUl2XJD4xCkJoZSaYc= github.com/golangci/gosec v0.0.0-20180901114220-8afd9cbb6cfb/go.mod h1:ON/c2UR0VAAv6ZEAFKhjCLplESSmRFfZcDLASbI1GWo= -github.com/golangci/misspell v0.5.1 h1:/SjR1clj5uDjNLwYzCahHwIOPmQgoH04AyQIiWGbhCM= -github.com/golangci/misspell v0.5.1/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= +github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs= +github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 h1:leSNB7iYzLYSSx3J/s5sVf4Drkc68W2wm4Ixh/mr0us= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -414,8 +414,8 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= -github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20241001023024-f4c0cfd0cf1d h1:Jaz2JzpQaQXyET0AjLBXShrthbpqMkhGiEfkcQAiAUs= +github.com/google/pprof v0.0.0-20241001023024-f4c0cfd0cf1d/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= @@ -438,8 +438,8 @@ github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5 github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= @@ -749,8 +749,8 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500 h1:WnNuhiq+FOY3jNj6JXFT+eLN3CQ/oPIsDPRanvwsmbI= github.com/shabbyrobe/gocovmerge v0.0.0-20190829150210-3e036491d500/go.mod h1:+njLrG5wSeoG4Ds61rFgEzKvenR2UHbjMoDHsczxly0= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= -github.com/shirou/gopsutil/v3 v3.24.4 h1:dEHgzZXt4LMNm+oYELpzl9YCqV65Yr/6SfrvgRBtXeU= -github.com/shirou/gopsutil/v3 v3.24.4/go.mod h1:lTd2mdiOspcqLgAnr9/nGi71NkeMpWKdmhuxm9GusH8= +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= @@ -782,8 +782,8 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -964,8 +964,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.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -981,8 +981,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= +golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= @@ -1025,8 +1025,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.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= 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= @@ -1074,8 +1074,8 @@ 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.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= 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= @@ -1164,9 +1164,8 @@ 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.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -1176,8 +1175,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.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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= @@ -1191,8 +1190,8 @@ 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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -1264,8 +1263,8 @@ 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.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= 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= @@ -1433,8 +1432,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= -honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= +honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I= +honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs= k8s.io/api v0.28.6 h1:yy6u9CuIhmg55YvF/BavPBBXB+5QicB64njJXxVnzLo= k8s.io/api v0.28.6/go.mod h1:AM6Ys6g9MY3dl/XNaNfg/GePI0FT7WBGu8efU/lirAo= k8s.io/apimachinery v0.28.6 h1:RsTeR4z6S07srPg6XYrwXpTJVMXsjPXn0ODakMytSW0= diff --git a/pkg/autoid_service/autoid.go b/pkg/autoid_service/autoid.go index b45b094dd469e..513a259a1b4de 100644 --- a/pkg/autoid_service/autoid.go +++ b/pkg/autoid_service/autoid.go @@ -63,7 +63,7 @@ type autoIDValue struct { } func (alloc *autoIDValue) alloc4Unsigned(ctx context.Context, store kv.Storage, dbID, tblID int64, isUnsigned bool, - n uint64, increment, offset int64) (min int64, max int64, err error) { + n uint64, increment, offset int64) (minv, maxv int64, err error) { // Check offset rebase if necessary. if uint64(offset-1) > uint64(alloc.base) { if err := alloc.rebase4Unsigned(ctx, store, dbID, tblID, uint64(offset-1)); err != nil { @@ -122,17 +122,17 @@ func (alloc *autoIDValue) alloc4Unsigned(ctx context.Context, store kv.Storage, zap.Int64("to end", newEnd)) alloc.end = newEnd } - min = alloc.base + minv = alloc.base // Use uint64 n directly. alloc.base = int64(uint64(alloc.base) + uint64(n1)) - return min, alloc.base, nil + return minv, alloc.base, nil } func (alloc *autoIDValue) alloc4Signed(ctx context.Context, store kv.Storage, dbID, tblID int64, isUnsigned bool, - n uint64, increment, offset int64) (min int64, max int64, err error) { + n uint64, increment, offset int64) (minv, maxv int64, err error) { // Check offset rebase if necessary. if offset-1 > alloc.base { if err := alloc.rebase4Signed(ctx, store, dbID, tblID, offset-1); err != nil { @@ -198,9 +198,9 @@ func (alloc *autoIDValue) alloc4Signed(ctx context.Context, zap.Int64("to end", newEnd)) alloc.end = newEnd } - min = alloc.base + minv = alloc.base alloc.base += n1 - return min, alloc.base, nil + return minv, alloc.base, nil } func (alloc *autoIDValue) rebase4Unsigned(ctx context.Context, @@ -502,20 +502,20 @@ func (s *Service) allocAutoID(ctx context.Context, req *autoid.AutoIDRequest) (* }, nil } - var min, max int64 + var minv, maxv int64 var err error if req.IsUnsigned { - min, max, err = val.alloc4Unsigned(ctx, s.store, req.DbID, req.TblID, req.IsUnsigned, req.N, req.Increment, req.Offset) + minv, maxv, err = val.alloc4Unsigned(ctx, s.store, req.DbID, req.TblID, req.IsUnsigned, req.N, req.Increment, req.Offset) } else { - min, max, err = val.alloc4Signed(ctx, s.store, req.DbID, req.TblID, req.IsUnsigned, req.N, req.Increment, req.Offset) + minv, maxv, err = val.alloc4Signed(ctx, s.store, req.DbID, req.TblID, req.IsUnsigned, req.N, req.Increment, req.Offset) } if err != nil { return &autoid.AutoIDResponse{Errmsg: []byte(err.Error())}, nil } return &autoid.AutoIDResponse{ - Min: min, - Max: max, + Min: minv, + Max: maxv, }, nil } diff --git a/pkg/autoid_service/autoid_test.go b/pkg/autoid_service/autoid_test.go index 6298611b99760..74a73f1d18e8f 100644 --- a/pkg/autoid_service/autoid_test.go +++ b/pkg/autoid_service/autoid_test.go @@ -38,9 +38,9 @@ type autoIDResp struct { *testing.T } -func (resp autoIDResp) check(min, max int64) { +func (resp autoIDResp) check(minv, maxv int64) { require.NoError(resp.T, resp.error) - require.Equal(resp.T, resp.AutoIDResponse, &autoid.AutoIDResponse{Min: min, Max: max}) + require.Equal(resp.T, resp.AutoIDResponse, &autoid.AutoIDResponse{Min: minv, Max: maxv}) } func (resp autoIDResp) checkErrmsg() { @@ -102,12 +102,12 @@ type dest struct { tblID int64 } -func checkCurrValue(t *testing.T, cli autoid.AutoIDAllocClient, to dest, min, max int64) { +func checkCurrValue(t *testing.T, cli autoid.AutoIDAllocClient, to dest, minv, maxv int64) { req := &autoid.AutoIDRequest{DbID: to.dbID, TblID: to.tblID, N: 0, KeyspaceID: uint32(tikv.NullspaceID)} ctx := context.Background() resp, err := cli.AllocAutoID(ctx, req) require.NoError(t, err) - require.Equal(t, resp, &autoid.AutoIDResponse{Min: min, Max: max}) + require.Equal(t, resp, &autoid.AutoIDResponse{Min: minv, Max: maxv}) } func autoIDRequest(t *testing.T, cli autoid.AutoIDAllocClient, to dest, unsigned bool, n uint64, more ...int64) autoIDResp { diff --git a/pkg/ddl/job_worker.go b/pkg/ddl/job_worker.go index a24ea6f70db7b..96f4373604d21 100644 --- a/pkg/ddl/job_worker.go +++ b/pkg/ddl/job_worker.go @@ -658,9 +658,9 @@ func skipWriteBinlog(job *model.Job) bool { return false } -func chooseLeaseTime(t, max time.Duration) time.Duration { - if t == 0 || t > max { - return max +func chooseLeaseTime(t, maxv time.Duration) time.Duration { + if t == 0 || t > maxv { + return maxv } return t } diff --git a/pkg/ddl/partition.go b/pkg/ddl/partition.go index 317368d2cb100..a7cc4cf569b75 100644 --- a/pkg/ddl/partition.go +++ b/pkg/ddl/partition.go @@ -780,8 +780,8 @@ func getPartitionIntervalFromTable(ctx expression.BuildContext, tbInfo *model.Ta if len(tbInfo.Partition.Columns) > 0 { partCol := findColumnByName(tbInfo.Partition.Columns[0].L, tbInfo) if partCol.FieldType.EvalType() == types.ETInt { - min := getLowerBoundInt(partCol) - minVal = strconv.FormatInt(min, 10) + minv := getLowerBoundInt(partCol) + minVal = strconv.FormatInt(minv, 10) } else if partCol.FieldType.EvalType() == types.ETDatetime { isIntType = false minVal = "0000-01-01" @@ -1076,15 +1076,15 @@ func generatePartitionDefinitionsFromInterval(ctx expression.BuildContext, partO // set LESS THAN to ZeroTime partExpr = ast.NewValueExpr("0000-01-01", "", "") } else { - var min int64 + var minv int64 if partCol != nil { - min = getLowerBoundInt(partCol) + minv = getLowerBoundInt(partCol) } else { if !isPartExprUnsigned(ctx.GetEvalCtx(), tbInfo) { - min = math.MinInt64 + minv = math.MinInt64 } } - partExpr = ast.NewValueExpr(min, "", "") + partExpr = ast.NewValueExpr(minv, "", "") } partOptions.Definitions = append(partOptions.Definitions, &ast.PartitionDefinition{ Name: pmodel.NewCIStr("P_NULL"), diff --git a/pkg/ddl/split_region.go b/pkg/ddl/split_region.go index 5152197279ff5..affa168b91eeb 100644 --- a/pkg/ddl/split_region.go +++ b/pkg/ddl/split_region.go @@ -112,10 +112,10 @@ func preSplitPhysicalTableByShardRowID(ctx context.Context, store kv.SplittableS } shardFmt := autoid.NewShardIDFormat(ft, shardingBits(tbInfo), tbInfo.AutoRandomRangeBits) step := int64(1 << (shardFmt.ShardBits - tbInfo.PreSplitRegions)) - max := int64(1 << shardFmt.ShardBits) + maxv := int64(1 << shardFmt.ShardBits) splitTableKeys := make([][]byte, 0, 1<<(tbInfo.PreSplitRegions)) splitTableKeys = append(splitTableKeys, tablecodec.GenTablePrefix(physicalID)) - for p := step; p < max; p += step { + for p := step; p < maxv; p += step { recordID := p << shardFmt.IncrementalBits recordPrefix := tablecodec.GenTableRecordPrefix(physicalID) key := tablecodec.EncodeRecordKey(recordPrefix, kv.IntHandle(recordID)) diff --git a/pkg/domain/domain.go b/pkg/domain/domain.go index 0a5eea3bf701b..d23e6ce1af3d1 100644 --- a/pkg/domain/domain.go +++ b/pkg/domain/domain.go @@ -2981,8 +2981,8 @@ func (do *Domain) releaseServerID(context.Context) { // propose server ID by random. func (*Domain) proposeServerID(ctx context.Context, conflictCnt int) (uint64, error) { // get a random server ID in range [min, max] - randomServerID := func(min uint64, max uint64) uint64 { - return uint64(rand.Int63n(int64(max-min+1)) + int64(min)) // #nosec G404 + randomServerID := func(minv uint64, maxv uint64) uint64 { + return uint64(rand.Int63n(int64(maxv-minv+1)) + int64(minv)) // #nosec G404 } if conflictCnt < acquire32BitsServerIDRetryCnt { diff --git a/pkg/executor/executor_pkg_test.go b/pkg/executor/executor_pkg_test.go index bc390f7bcf1c2..b0d2133af38a3 100644 --- a/pkg/executor/executor_pkg_test.go +++ b/pkg/executor/executor_pkg_test.go @@ -187,6 +187,8 @@ func TestAggPartialResultMapperB(t *testing.T) { 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{ { diff --git a/pkg/executor/infoschema_reader.go b/pkg/executor/infoschema_reader.go index 54ce503bb8a2d..1ba7943aa851b 100644 --- a/pkg/executor/infoschema_reader.go +++ b/pkg/executor/infoschema_reader.go @@ -3875,7 +3875,7 @@ func checkRule(rule *label.Rule) (dbName, tableName string, partitionName string err = errors.New("empty label rule type") return } - if rule.Labels == nil || len(rule.Labels) == 0 { + if len(rule.Labels) == 0 { err = errors.New("the label rule has no label") return } diff --git a/pkg/executor/insert_common.go b/pkg/executor/insert_common.go index 810fb014221dc..20f70c24f7164 100644 --- a/pkg/executor/insert_common.go +++ b/pkg/executor/insert_common.go @@ -873,19 +873,19 @@ func (e *InsertValues) lazyAdjustAutoIncrementDatum(ctx context.Context, rows [] } // AllocBatchAutoIncrementValue allocates batch N consecutive autoIDs. // The max value can be derived from adding the increment value to min for cnt-1 times. - min, increment, err := table.AllocBatchAutoIncrementValue(ctx, e.Table, e.Ctx(), cnt) + minv, increment, err := table.AllocBatchAutoIncrementValue(ctx, e.Table, e.Ctx(), cnt) if e.handleErr(col, &autoDatum, cnt, err) != nil { return nil, err } // It's compatible with mysql setting the first allocated autoID to lastInsertID. // Cause autoID may be specified by user, judge only the first row is not suitable. if e.lastInsertID == 0 { - e.lastInsertID = uint64(min) + e.lastInsertID = uint64(minv) } // Assign autoIDs to rows. for j := 0; j < cnt; j++ { offset := j + start - id := int64(uint64(min) + uint64(j)*uint64(increment)) + id := int64(uint64(minv) + uint64(j)*uint64(increment)) err = setDatumAutoIDAndCast(e.Ctx(), &rows[offset][idx], id, col) if err != nil { return nil, err diff --git a/pkg/executor/inspection_profile.go b/pkg/executor/inspection_profile.go index 773fc70d15736..a4b68852a8c91 100644 --- a/pkg/executor/inspection_profile.go +++ b/pkg/executor/inspection_profile.go @@ -409,27 +409,27 @@ func (pb *profileBuilder) GetMaxNodeValue(root *metricNode) (float64, error) { if err != nil { return 0.0, err } - max := value.getValue(pb.valueTP) + maxv := value.getValue(pb.valueTP) for _, v := range n.labelValue { - if v.getValue(pb.valueTP) > max { - max = v.getValue(pb.valueTP) + if v.getValue(pb.valueTP) > maxv { + maxv = v.getValue(pb.valueTP) } } for _, child := range n.children { childMax, err := pb.GetMaxNodeValue(child) if err != nil { - return max, err + return maxv, err } - if childMax > max { - max = childMax + if childMax > maxv { + maxv = childMax } for _, v := range n.labelValue { - if v.getValue(pb.valueTP) > max { - max = v.getValue(pb.valueTP) + if v.getValue(pb.valueTP) > maxv { + maxv = v.getValue(pb.valueTP) } } } - return max, nil + return maxv, nil } func (pb *profileBuilder) traversal(n *metricNode) error { diff --git a/pkg/expression/builtin_compare.go b/pkg/expression/builtin_compare.go index 8d53d69f7bb07..18a935b274829 100644 --- a/pkg/expression/builtin_compare.go +++ b/pkg/expression/builtin_compare.go @@ -566,19 +566,19 @@ func (b *builtinGreatestIntSig) Clone() builtinFunc { // evalInt evals a builtinGreatestIntSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_greatest -func (b *builtinGreatestIntSig) evalInt(ctx EvalContext, row chunk.Row) (max int64, isNull bool, err error) { - max, isNull, err = b.args[0].EvalInt(ctx, row) +func (b *builtinGreatestIntSig) evalInt(ctx EvalContext, row chunk.Row) (maxv int64, isNull bool, err error) { + maxv, isNull, err = b.args[0].EvalInt(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } for i := 1; i < len(b.args); i++ { var v int64 v, isNull, err = b.args[i].EvalInt(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } - if v > max { - max = v + if v > maxv { + maxv = v } } return @@ -596,19 +596,19 @@ func (b *builtinGreatestRealSig) Clone() builtinFunc { // evalReal evals a builtinGreatestRealSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_greatest -func (b *builtinGreatestRealSig) evalReal(ctx EvalContext, row chunk.Row) (max float64, isNull bool, err error) { - max, isNull, err = b.args[0].EvalReal(ctx, row) +func (b *builtinGreatestRealSig) evalReal(ctx EvalContext, row chunk.Row) (maxv float64, isNull bool, err error) { + maxv, isNull, err = b.args[0].EvalReal(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } for i := 1; i < len(b.args); i++ { var v float64 v, isNull, err = b.args[i].EvalReal(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } - if v > max { - max = v + if v > maxv { + maxv = v } } return @@ -626,19 +626,19 @@ func (b *builtinGreatestDecimalSig) Clone() builtinFunc { // evalDecimal evals a builtinGreatestDecimalSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_greatest -func (b *builtinGreatestDecimalSig) evalDecimal(ctx EvalContext, row chunk.Row) (max *types.MyDecimal, isNull bool, err error) { - max, isNull, err = b.args[0].EvalDecimal(ctx, row) +func (b *builtinGreatestDecimalSig) evalDecimal(ctx EvalContext, row chunk.Row) (maxv *types.MyDecimal, isNull bool, err error) { + maxv, isNull, err = b.args[0].EvalDecimal(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } for i := 1; i < len(b.args); i++ { var v *types.MyDecimal v, isNull, err = b.args[i].EvalDecimal(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } - if v.Compare(max) > 0 { - max = v + if v.Compare(maxv) > 0 { + maxv = v } } return @@ -656,19 +656,19 @@ func (b *builtinGreatestStringSig) Clone() builtinFunc { // evalString evals a builtinGreatestStringSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_greatest -func (b *builtinGreatestStringSig) evalString(ctx EvalContext, row chunk.Row) (max string, isNull bool, err error) { - max, isNull, err = b.args[0].EvalString(ctx, row) +func (b *builtinGreatestStringSig) evalString(ctx EvalContext, row chunk.Row) (maxv string, isNull bool, err error) { + maxv, isNull, err = b.args[0].EvalString(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } for i := 1; i < len(b.args); i++ { var v string v, isNull, err = b.args[i].EvalString(ctx, row) if isNull || err != nil { - return max, isNull, err + return maxv, isNull, err } - if types.CompareString(v, max, b.collation) > 0 { - max = v + if types.CompareString(v, maxv, b.collation) > 0 { + maxv = v } } return @@ -892,19 +892,19 @@ func (b *builtinLeastIntSig) Clone() builtinFunc { // evalInt evals a builtinLeastIntSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_least -func (b *builtinLeastIntSig) evalInt(ctx EvalContext, row chunk.Row) (min int64, isNull bool, err error) { - min, isNull, err = b.args[0].EvalInt(ctx, row) +func (b *builtinLeastIntSig) evalInt(ctx EvalContext, row chunk.Row) (minv int64, isNull bool, err error) { + minv, isNull, err = b.args[0].EvalInt(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } for i := 1; i < len(b.args); i++ { var v int64 v, isNull, err = b.args[i].EvalInt(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } - if v < min { - min = v + if v < minv { + minv = v } } return @@ -922,19 +922,19 @@ func (b *builtinLeastRealSig) Clone() builtinFunc { // evalReal evals a builtinLeastRealSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#functionleast -func (b *builtinLeastRealSig) evalReal(ctx EvalContext, row chunk.Row) (min float64, isNull bool, err error) { - min, isNull, err = b.args[0].EvalReal(ctx, row) +func (b *builtinLeastRealSig) evalReal(ctx EvalContext, row chunk.Row) (minv float64, isNull bool, err error) { + minv, isNull, err = b.args[0].EvalReal(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } for i := 1; i < len(b.args); i++ { var v float64 v, isNull, err = b.args[i].EvalReal(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } - if v < min { - min = v + if v < minv { + minv = v } } return @@ -952,19 +952,19 @@ func (b *builtinLeastDecimalSig) Clone() builtinFunc { // evalDecimal evals a builtinLeastDecimalSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#functionleast -func (b *builtinLeastDecimalSig) evalDecimal(ctx EvalContext, row chunk.Row) (min *types.MyDecimal, isNull bool, err error) { - min, isNull, err = b.args[0].EvalDecimal(ctx, row) +func (b *builtinLeastDecimalSig) evalDecimal(ctx EvalContext, row chunk.Row) (minv *types.MyDecimal, isNull bool, err error) { + minv, isNull, err = b.args[0].EvalDecimal(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } for i := 1; i < len(b.args); i++ { var v *types.MyDecimal v, isNull, err = b.args[i].EvalDecimal(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } - if v.Compare(min) < 0 { - min = v + if v.Compare(minv) < 0 { + minv = v } } return @@ -982,19 +982,19 @@ func (b *builtinLeastStringSig) Clone() builtinFunc { // evalString evals a builtinLeastStringSig. // See http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#functionleast -func (b *builtinLeastStringSig) evalString(ctx EvalContext, row chunk.Row) (min string, isNull bool, err error) { - min, isNull, err = b.args[0].EvalString(ctx, row) +func (b *builtinLeastStringSig) evalString(ctx EvalContext, row chunk.Row) (minv string, isNull bool, err error) { + minv, isNull, err = b.args[0].EvalString(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } for i := 1; i < len(b.args); i++ { var v string v, isNull, err = b.args[i].EvalString(ctx, row) if isNull || err != nil { - return min, isNull, err + return minv, isNull, err } - if types.CompareString(v, min, b.collation) < 0 { - min = v + if types.CompareString(v, minv, b.collation) < 0 { + minv = v } } return diff --git a/pkg/expression/util.go b/pkg/expression/util.go index 73136f3a4af9e..b74322c3f8c88 100644 --- a/pkg/expression/util.go +++ b/pkg/expression/util.go @@ -1616,8 +1616,8 @@ const ( micro = 1000 * nano milli = 1000 * micro sec = 1000 * milli - min = 60 * sec - hour = 60 * min + minute = 60 * sec + hour = 60 * minute dayTime = 24 * hour ) @@ -1672,8 +1672,8 @@ func GetFormatNanoTime(time float64) string { } else if timeAbs >= hour { divisor = hour unit = "h" - } else if timeAbs >= min { - divisor = min + } else if timeAbs >= minute { + divisor = minute unit = "min" } else if timeAbs >= sec { divisor = sec diff --git a/pkg/extension/registry.go b/pkg/extension/registry.go index 4e838181f9b56..a1e20b0504ed8 100644 --- a/pkg/extension/registry.go +++ b/pkg/extension/registry.go @@ -107,12 +107,12 @@ func (r *registry) doSetup() (_ *Extensions, err error) { name := r.extensionNames[i] err = clearBuilder.DoWithCollectClear(func() (func(), error) { factory := r.factories[name] - m, clear, err := newManifestWithSetup(name, factory) + m, clearFunc, err := newManifestWithSetup(name, factory) if err != nil { return nil, err } manifests = append(manifests, m) - return clear, nil + return clearFunc, nil }) if err != nil { diff --git a/pkg/extension/util.go b/pkg/extension/util.go index 0d0ab6cff7084..7d7f6ba4a7d59 100644 --- a/pkg/extension/util.go +++ b/pkg/extension/util.go @@ -20,13 +20,13 @@ type clearFuncBuilder struct { // DoWithCollectClear executes a function and collect it clear function func (b *clearFuncBuilder) DoWithCollectClear(fn func() (func(), error)) error { - clear, err := fn() + clearFunc, err := fn() if err != nil { return err } - if clear != nil { - b.clears = append(b.clears, clear) + if clearFunc != nil { + b.clears = append(b.clears, clearFunc) } return nil diff --git a/pkg/infoschema/infoschema_v2.go b/pkg/infoschema/infoschema_v2.go index f6c4b04c869f1..e78dff9737d87 100644 --- a/pkg/infoschema/infoschema_v2.go +++ b/pkg/infoschema/infoschema_v2.go @@ -668,12 +668,12 @@ type TableItem struct { // Used by executor/infoschema_reader.go to handle reading from INFORMATION_SCHEMA.TABLES. // If visit return false, stop the iterate process. func (is *infoschemaV2) IterateAllTableItems(visit func(TableItem) bool) { - max, ok := is.byName.Max() + maxv, ok := is.byName.Max() if !ok { return } var pivot *tableItem - is.byName.Descend(max, func(item tableItem) bool { + is.byName.Descend(maxv, func(item tableItem) bool { if item.schemaVersion > is.schemaMetaVersion { // skip MVCC version, those items are not visible to the queried schema version return true diff --git a/pkg/lightning/common/pause_test.go b/pkg/lightning/common/pause_test.go index 2bd5e8a0a3316..dacffc4d6c806 100644 --- a/pkg/lightning/common/pause_test.go +++ b/pkg/lightning/common/pause_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/require" ) -func assertUnblocksBetween(t *testing.T, wg *sync.WaitGroup, min, max time.Duration) { +func assertUnblocksBetween(t *testing.T, wg *sync.WaitGroup, minv, maxv time.Duration) { ch := make(chan time.Duration) start := time.Now() go func() { @@ -34,10 +34,10 @@ func assertUnblocksBetween(t *testing.T, wg *sync.WaitGroup, min, max time.Durat }() select { case dur := <-ch: - if dur < min { + if dur < minv { t.Fatal("WaitGroup unblocked before minimum duration, it was " + dur.String()) } - case <-time.After(max): + case <-time.After(maxv): select { case dur := <-ch: t.Fatal("WaitGroup did not unblock after maximum duration, it was " + dur.String()) diff --git a/pkg/meta/autoid/autoid.go b/pkg/meta/autoid/autoid.go index c4198e3d23562..1f77fad8380b5 100644 --- a/pkg/meta/autoid/autoid.go +++ b/pkg/meta/autoid/autoid.go @@ -180,7 +180,7 @@ type Allocator interface { // AllocSeqCache allocs sequence batch value cached in table level(rather than in alloc), the returned range covering // the size of sequence cache with it's increment. The returned round indicates the sequence cycle times if it is with // cycle option. - AllocSeqCache() (min int64, max int64, round int64, err error) + AllocSeqCache() (minv, maxv, round int64, err error) // Rebase rebases the autoID base for table with tableID and the new base value. // If allocIDs is true, it will allocate some IDs and save to the cache. @@ -709,7 +709,7 @@ func NewAllocatorsFromTblInfo(r Requirement, dbID int64, tblInfo *model.TableInf // but actually we don't care about it, all we need is to calculate the new autoID corresponding to the // increment and offset at this time now. To simplify the rule is like (ID - offset) % increment = 0, // so the first autoID should be 9, then add increment to it to get 13. -func (alloc *allocator) Alloc(ctx context.Context, n uint64, increment, offset int64) (min int64, max int64, err error) { +func (alloc *allocator) Alloc(ctx context.Context, n uint64, increment, offset int64) (minv, maxv int64, err error) { if alloc.tbID == 0 { return 0, 0, errInvalidTableID.GenWithStackByArgs("Invalid tableID") } @@ -729,7 +729,7 @@ func (alloc *allocator) Alloc(ctx context.Context, n uint64, increment, offset i return alloc.alloc4Signed(ctx, n, increment, offset) } -func (alloc *allocator) AllocSeqCache() (min int64, max int64, round int64, err error) { +func (alloc *allocator) AllocSeqCache() (minv, maxv int64, round int64, err error) { alloc.mu.Lock() defer alloc.mu.Unlock() return alloc.alloc4Sequence() @@ -760,48 +760,48 @@ func CalcNeededBatchSize(base, n, increment, offset int64, isUnsigned bool) int6 } // CalcSequenceBatchSize calculate the next sequence batch size. -func CalcSequenceBatchSize(base, size, increment, offset, min, max int64) (int64, error) { +func CalcSequenceBatchSize(base, size, increment, offset, minv, maxv int64) (int64, error) { // The sequence is positive growth. if increment > 0 { if increment == 1 { // Sequence is already allocated to the end. - if base >= max { + if base >= maxv { return 0, ErrAutoincReadFailed } // The rest of sequence < cache size, return the rest. - if max-base < size { - return max - base, nil + if maxv-base < size { + return maxv - base, nil } // The rest of sequence is adequate. return size, nil } - nr, ok := SeekToFirstSequenceValue(base, increment, offset, min, max) + nr, ok := SeekToFirstSequenceValue(base, increment, offset, minv, maxv) if !ok { return 0, ErrAutoincReadFailed } // The rest of sequence < cache size, return the rest. - if max-nr < (size-1)*increment { - return max - base, nil + if maxv-nr < (size-1)*increment { + return maxv - base, nil } return (nr - base) + (size-1)*increment, nil } // The sequence is negative growth. if increment == -1 { - if base <= min { + if base <= minv { return 0, ErrAutoincReadFailed } - if base-min < size { - return base - min, nil + if base-minv < size { + return base - minv, nil } return size, nil } - nr, ok := SeekToFirstSequenceValue(base, increment, offset, min, max) + nr, ok := SeekToFirstSequenceValue(base, increment, offset, minv, maxv) if !ok { return 0, ErrAutoincReadFailed } // The rest of sequence < cache size, return the rest. - if nr-min < (size-1)*(-increment) { - return base - min, nil + if nr-minv < (size-1)*(-increment) { + return base - minv, nil } return (base - nr) + (size-1)*(-increment), nil } @@ -814,13 +814,13 @@ func CalcSequenceBatchSize(base, size, increment, offset, min, max int64) (int64 // // first := nr*increment + offset // Because formula computation will overflow Int64, so we transfer it to uint64 for distance computation. -func SeekToFirstSequenceValue(base, increment, offset, min, max int64) (int64, bool) { +func SeekToFirstSequenceValue(base, increment, offset, minv, maxv int64) (int64, bool) { if increment > 0 { // Sequence is already allocated to the end. - if base >= max { + if base >= maxv { return 0, false } - uMax := EncodeIntToCmpUint(max) + uMax := EncodeIntToCmpUint(maxv) uBase := EncodeIntToCmpUint(base) uOffset := EncodeIntToCmpUint(offset) uIncrement := uint64(increment) @@ -839,10 +839,10 @@ func SeekToFirstSequenceValue(base, increment, offset, min, max int64) (int64, b return first, true } // Sequence is already allocated to the end. - if base <= min { + if base <= minv { return 0, false } - uMin := EncodeIntToCmpUint(min) + uMin := EncodeIntToCmpUint(minv) uBase := EncodeIntToCmpUint(base) uOffset := EncodeIntToCmpUint(offset) uIncrement := uint64(-increment) @@ -875,7 +875,7 @@ func SeekToFirstAutoIDUnSigned(base, increment, offset uint64) uint64 { return nr } -func (alloc *allocator) alloc4Signed(ctx context.Context, n uint64, increment, offset int64) (mini int64, max int64, err error) { +func (alloc *allocator) alloc4Signed(ctx context.Context, n uint64, increment, offset int64) (minv, maxv int64, err error) { // Check offset rebase if necessary. if offset-1 > alloc.base { if err := alloc.rebase4Signed(ctx, offset-1, true); err != nil { @@ -958,12 +958,12 @@ func (alloc *allocator) alloc4Signed(ctx context.Context, n uint64, increment, o zap.Int64("table ID", alloc.tbID), zap.Int64("database ID", alloc.dbID)) } - mini = alloc.base + minv = alloc.base alloc.base += n1 - return mini, alloc.base, nil + return minv, alloc.base, nil } -func (alloc *allocator) alloc4Unsigned(ctx context.Context, n uint64, increment, offset int64) (mini int64, max int64, err error) { +func (alloc *allocator) alloc4Unsigned(ctx context.Context, n uint64, increment, offset int64) (minv int64, maxv int64, err error) { // Check offset rebase if necessary. if uint64(offset-1) > uint64(alloc.base) { if err := alloc.rebase4Unsigned(ctx, uint64(offset-1), true); err != nil { @@ -1049,10 +1049,10 @@ func (alloc *allocator) alloc4Unsigned(ctx context.Context, n uint64, increment, zap.Uint64("to ID", uint64(alloc.base+n1)), zap.Int64("table ID", alloc.tbID), zap.Int64("database ID", alloc.dbID)) - mini = alloc.base + minv = alloc.base // Use uint64 n directly. alloc.base = int64(uint64(alloc.base) + uint64(n1)) - return mini, alloc.base, nil + return minv, alloc.base, nil } func getAllocatorStatsFromCtx(ctx context.Context) (context.Context, *AllocatorRuntimeStats, **tikvutil.CommitDetails) { @@ -1072,7 +1072,7 @@ func getAllocatorStatsFromCtx(ctx context.Context) (context.Context, *AllocatorR // 3: sequence allocation may have negative growth. // 4: sequence allocation batch length can be dissatisfied. // 5: sequence batch allocation will be consumed immediately. -func (alloc *allocator) alloc4Sequence() (min int64, max int64, round int64, err error) { +func (alloc *allocator) alloc4Sequence() (minv int64, maxv int64, round int64, err error) { increment := alloc.sequence.Increment offset := alloc.sequence.Start minValue := alloc.sequence.MinValue diff --git a/pkg/meta/autoid/autoid_service.go b/pkg/meta/autoid/autoid_service.go index 3ef9a5e728a58..44eadbc331e5c 100644 --- a/pkg/meta/autoid/autoid_service.go +++ b/pkg/meta/autoid/autoid_service.go @@ -124,7 +124,7 @@ func (d *ClientDiscover) GetClient(ctx context.Context) (autoid.AutoIDAllocClien // The returned range is (min, max]: // case increment=1 & offset=1: you can derive the ids like min+1, min+2... max. // case increment=x & offset=y: you firstly need to seek to firstID by `SeekToFirstAutoIDXXX`, then derive the IDs like firstID, firstID + increment * 2... in the caller. -func (sp *singlePointAlloc) Alloc(ctx context.Context, n uint64, increment, offset int64) (min int64, max int64, _ error) { +func (sp *singlePointAlloc) Alloc(ctx context.Context, n uint64, increment, offset int64) (minv, maxv int64, _ error) { r, ctx := tracing.StartRegionEx(ctx, "autoid.Alloc") defer r.End() @@ -308,8 +308,8 @@ func (sp *singlePointAlloc) End() int64 { // NextGlobalAutoID returns the next global autoID. // Used by 'show create table', 'alter table auto_increment = xxx' func (sp *singlePointAlloc) NextGlobalAutoID() (int64, error) { - _, max, err := sp.Alloc(context.Background(), 0, 1, 1) - return max + 1, err + _, maxv, err := sp.Alloc(context.Background(), 0, 1, 1) + return maxv + 1, err } func (*singlePointAlloc) GetType() AllocatorType { diff --git a/pkg/meta/autoid/autoid_test.go b/pkg/meta/autoid/autoid_test.go index 9b28e57c7515c..0128ba6199ae9 100644 --- a/pkg/meta/autoid/autoid_test.go +++ b/pkg/meta/autoid/autoid_test.go @@ -164,42 +164,42 @@ func TestSignedAutoid(t *testing.T) { globalAutoID, err = alloc.NextGlobalAutoID() require.NoError(t, err) require.Equal(t, int64(1), globalAutoID) - min, max, err := alloc.Alloc(ctx, 1, 1, 1) + minv, maxv, err := alloc.Alloc(ctx, 1, 1, 1) require.NoError(t, err) - require.Equal(t, int64(1), max-min) - require.Equal(t, int64(1), min+1) + require.Equal(t, int64(1), maxv-minv) + require.Equal(t, int64(1), minv+1) - min, max, err = alloc.Alloc(ctx, 2, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 2, 1, 1) require.NoError(t, err) - require.Equal(t, int64(2), max-min) - require.Equal(t, int64(2), min+1) - require.Equal(t, int64(3), max) + require.Equal(t, int64(2), maxv-minv) + require.Equal(t, int64(2), minv+1) + require.Equal(t, int64(3), maxv) - min, max, err = alloc.Alloc(ctx, 100, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 100, 1, 1) require.NoError(t, err) - require.Equal(t, int64(100), max-min) + require.Equal(t, int64(100), maxv-minv) expected := int64(4) - for i := min + 1; i <= max; i++ { + for i := minv + 1; i <= maxv; i++ { require.Equal(t, expected, i) expected++ } err = alloc.Rebase(context.Background(), int64(1000), false) require.NoError(t, err) - min, max, err = alloc.Alloc(ctx, 3, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 3, 1, 1) require.NoError(t, err) - require.Equal(t, int64(3), max-min) - require.Equal(t, int64(1001), min+1) - require.Equal(t, int64(1002), min+2) - require.Equal(t, int64(1003), max) + require.Equal(t, int64(3), maxv-minv) + require.Equal(t, int64(1001), minv+1) + require.Equal(t, int64(1002), minv+2) + require.Equal(t, int64(1003), maxv) lastRemainOne := alloc.End() err = alloc.Rebase(context.Background(), alloc.End()-2, false) require.NoError(t, err) - min, max, err = alloc.Alloc(ctx, 5, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 5, 1, 1) require.NoError(t, err) - require.Equal(t, int64(5), max-min) - require.Greater(t, min+1, lastRemainOne) + require.Equal(t, int64(5), maxv-minv) + require.Greater(t, minv+1, lastRemainOne) // Test for increment & offset for signed. alloc = autoid.NewAllocator(mockRequirement{store}, 1, 5, false, autoid.RowIDAllocType) @@ -209,46 +209,46 @@ func TestSignedAutoid(t *testing.T) { offset := int64(100) require.NoError(t, err) require.Equal(t, int64(1), globalAutoID) - min, max, err = alloc.Alloc(ctx, 1, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 1, increment, offset) require.NoError(t, err) - require.Equal(t, int64(99), min) - require.Equal(t, int64(100), max) + require.Equal(t, int64(99), minv) + require.Equal(t, int64(100), maxv) - min, max, err = alloc.Alloc(ctx, 2, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 2, increment, offset) require.NoError(t, err) - require.Equal(t, int64(4), max-min) - require.Equal(t, autoid.CalcNeededBatchSize(100, 2, increment, offset, false), max-min) - require.Equal(t, int64(100), min) - require.Equal(t, int64(104), max) + require.Equal(t, int64(4), maxv-minv) + require.Equal(t, autoid.CalcNeededBatchSize(100, 2, increment, offset, false), maxv-minv) + require.Equal(t, int64(100), minv) + require.Equal(t, int64(104), maxv) increment = int64(5) - min, max, err = alloc.Alloc(ctx, 3, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 3, increment, offset) require.NoError(t, err) - require.Equal(t, int64(11), max-min) - require.Equal(t, autoid.CalcNeededBatchSize(104, 3, increment, offset, false), max-min) - require.Equal(t, int64(104), min) - require.Equal(t, int64(115), max) + require.Equal(t, int64(11), maxv-minv) + require.Equal(t, autoid.CalcNeededBatchSize(104, 3, increment, offset, false), maxv-minv) + require.Equal(t, int64(104), minv) + require.Equal(t, int64(115), maxv) firstID := autoid.SeekToFirstAutoIDSigned(104, increment, offset) require.Equal(t, int64(105), firstID) increment = int64(15) - min, max, err = alloc.Alloc(ctx, 2, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 2, increment, offset) require.NoError(t, err) - require.Equal(t, int64(30), max-min) - require.Equal(t, autoid.CalcNeededBatchSize(115, 2, increment, offset, false), max-min) - require.Equal(t, int64(115), min) - require.Equal(t, int64(145), max) + require.Equal(t, int64(30), maxv-minv) + require.Equal(t, autoid.CalcNeededBatchSize(115, 2, increment, offset, false), maxv-minv) + require.Equal(t, int64(115), minv) + require.Equal(t, int64(145), maxv) firstID = autoid.SeekToFirstAutoIDSigned(115, increment, offset) require.Equal(t, int64(130), firstID) offset = int64(200) - min, max, err = alloc.Alloc(ctx, 2, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 2, increment, offset) require.NoError(t, err) - require.Equal(t, int64(16), max-min) + require.Equal(t, int64(16), maxv-minv) // offset-1 > base will cause alloc rebase to offset-1. - require.Equal(t, autoid.CalcNeededBatchSize(offset-1, 2, increment, offset, false), max-min) - require.Equal(t, int64(199), min) - require.Equal(t, int64(215), max) + require.Equal(t, autoid.CalcNeededBatchSize(offset-1, 2, increment, offset, false), maxv-minv) + require.Equal(t, int64(199), minv) + require.Equal(t, int64(215), maxv) firstID = autoid.SeekToFirstAutoIDSigned(offset-1, increment, offset) require.Equal(t, int64(200), firstID) } @@ -372,27 +372,27 @@ func TestUnsignedAutoid(t *testing.T) { require.NoError(t, err) require.Equal(t, int64(1), globalAutoID) - min, max, err := alloc.Alloc(ctx, 2, 1, 1) + minv, maxv, err := alloc.Alloc(ctx, 2, 1, 1) require.NoError(t, err) - require.Equal(t, int64(2), max-min) - require.Equal(t, int64(1), min+1) - require.Equal(t, int64(2), max) + require.Equal(t, int64(2), maxv-minv) + require.Equal(t, int64(1), minv+1) + require.Equal(t, int64(2), maxv) err = alloc.Rebase(context.Background(), int64(500), true) require.NoError(t, err) - min, max, err = alloc.Alloc(ctx, 2, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 2, 1, 1) require.NoError(t, err) - require.Equal(t, int64(2), max-min) - require.Equal(t, int64(501), min+1) - require.Equal(t, int64(502), max) + require.Equal(t, int64(2), maxv-minv) + require.Equal(t, int64(501), minv+1) + require.Equal(t, int64(502), maxv) lastRemainOne := alloc.End() err = alloc.Rebase(context.Background(), alloc.End()-2, false) require.NoError(t, err) - min, max, err = alloc.Alloc(ctx, 5, 1, 1) + minv, maxv, err = alloc.Alloc(ctx, 5, 1, 1) require.NoError(t, err) - require.Equal(t, int64(5), max-min) - require.Greater(t, min+1, lastRemainOne) + require.Equal(t, int64(5), maxv-minv) + require.Greater(t, minv+1, lastRemainOne) // Test increment & offset for unsigned. Using AutoRandomType to avoid valid range check for increment and offset. alloc = autoid.NewAllocator(mockRequirement{store}, 1, 5, true, autoid.AutoRandomType) @@ -404,13 +404,13 @@ func TestUnsignedAutoid(t *testing.T) { n = math.MaxUint64 - 100 offset := int64(n) - min, max, err = alloc.Alloc(ctx, 2, increment, offset) + minv, maxv, err = alloc.Alloc(ctx, 2, increment, offset) require.NoError(t, err) - require.Equal(t, uint64(math.MaxUint64-101), uint64(min)) - require.Equal(t, uint64(math.MaxUint64-98), uint64(max)) + require.Equal(t, uint64(math.MaxUint64-101), uint64(minv)) + require.Equal(t, uint64(math.MaxUint64-98), uint64(maxv)) - require.Equal(t, autoid.CalcNeededBatchSize(int64(uint64(offset)-1), 2, increment, offset, true), max-min) - firstID := autoid.SeekToFirstAutoIDUnSigned(uint64(min), uint64(increment), uint64(offset)) + require.Equal(t, autoid.CalcNeededBatchSize(int64(uint64(offset)-1), 2, increment, offset, true), maxv-minv) + firstID := autoid.SeekToFirstAutoIDUnSigned(uint64(minv), uint64(increment), uint64(offset)) require.Equal(t, uint64(math.MaxUint64-100), firstID) } @@ -468,7 +468,7 @@ func TestConcurrentAlloc(t *testing.T) { // test Alloc N N := rand.Uint64() % 100 - min, max, err1 := alloc.Alloc(ctx, N, 1, 1) + minv, maxv, err1 := alloc.Alloc(ctx, N, 1, 1) if err1 != nil { errCh <- err1 break @@ -476,7 +476,7 @@ func TestConcurrentAlloc(t *testing.T) { errFlag := false mu.Lock() - for i := min + 1; i <= max; i++ { + for i := minv + 1; i <= maxv; i++ { if _, ok := m[i]; ok { errCh <- fmt.Errorf("duplicate id:%v", i) errFlag = true @@ -599,14 +599,14 @@ func TestAllocComputationIssue(t *testing.T) { autoid.TestModifyBaseAndEndInjection(signedAlloc1, 4, 6) // Here will recompute the new allocator batch size base on new base = 10, which will get 6. - min, max, err := unsignedAlloc1.Alloc(ctx, 2, 3, 1) + minv, maxv, err := unsignedAlloc1.Alloc(ctx, 2, 3, 1) require.NoError(t, err) - require.Equal(t, int64(10), min) - require.Equal(t, int64(16), max) - min, max, err = signedAlloc2.Alloc(ctx, 2, 3, 1) + require.Equal(t, int64(10), minv) + require.Equal(t, int64(16), maxv) + minv, maxv, err = signedAlloc2.Alloc(ctx, 2, 3, 1) require.NoError(t, err) - require.Equal(t, int64(7), min) - require.Equal(t, int64(13), max) + require.Equal(t, int64(7), minv) + require.Equal(t, int64(13), maxv) } func TestIssue40584(t *testing.T) { diff --git a/pkg/meta/autoid/memid.go b/pkg/meta/autoid/memid.go index 65383178786af..263c74005a9dd 100644 --- a/pkg/meta/autoid/memid.go +++ b/pkg/meta/autoid/memid.go @@ -79,7 +79,7 @@ func (alloc *inMemoryAllocator) NextGlobalAutoID() (int64, error) { return alloc.base + 1, nil } -func (alloc *inMemoryAllocator) Alloc(_ context.Context, n uint64, increment, offset int64) (min int64, max int64, err error) { +func (alloc *inMemoryAllocator) Alloc(_ context.Context, n uint64, increment, offset int64) (minv int64, maxv int64, err error) { if n == 0 { return 0, 0, nil } @@ -116,7 +116,7 @@ func (alloc *inMemoryAllocator) ForceRebase(requiredBase int64) error { return nil } -func (alloc *inMemoryAllocator) alloc4Signed(n uint64, increment, offset int64) (min int64, max int64, err error) { +func (alloc *inMemoryAllocator) alloc4Signed(n uint64, increment, offset int64) (minv, maxv int64, err error) { // Check offset rebase if necessary. if offset-1 > alloc.base { alloc.base = offset - 1 @@ -129,12 +129,12 @@ func (alloc *inMemoryAllocator) alloc4Signed(n uint64, increment, offset int64) return 0, 0, ErrAutoincReadFailed } - min = alloc.base + minv = alloc.base alloc.base += n1 - return min, alloc.base, nil + return minv, alloc.base, nil } -func (alloc *inMemoryAllocator) alloc4Unsigned(n uint64, increment, offset int64) (min int64, max int64, err error) { +func (alloc *inMemoryAllocator) alloc4Unsigned(n uint64, increment, offset int64) (minv int64, maxv int64, err error) { // Check offset rebase if necessary. if uint64(offset)-1 > uint64(alloc.base) { alloc.base = int64(uint64(offset) - 1) @@ -148,10 +148,10 @@ func (alloc *inMemoryAllocator) alloc4Unsigned(n uint64, increment, offset int64 return 0, 0, ErrAutoincReadFailed } - min = alloc.base + minv = alloc.base // Use uint64 n directly. alloc.base = int64(uint64(alloc.base) + uint64(n1)) - return min, alloc.base, nil + return minv, alloc.base, nil } func (*inMemoryAllocator) Transfer(_, _ int64) error { diff --git a/pkg/parser/ast/dml.go b/pkg/parser/ast/dml.go index 2356714aba537..898ba923e0fba 100644 --- a/pkg/parser/ast/dml.go +++ b/pkg/parser/ast/dml.go @@ -1273,7 +1273,7 @@ func (n *SelectStmt) Restore(ctx *format.RestoreCtx) error { ctx.WriteKeyWord("SQL_CALC_FOUND_ROWS ") } - if n.TableHints != nil && len(n.TableHints) != 0 { + if len(n.TableHints) != 0 { ctx.WritePlain("/*+ ") for i, tableHint := range n.TableHints { if i != 0 { @@ -1472,7 +1472,7 @@ func (n *SelectStmt) Accept(v Visitor) (Node, bool) { n.With = node.(*WithClause) } - if n.TableHints != nil && len(n.TableHints) != 0 { + if len(n.TableHints) != 0 { newHints := make([]*TableOptimizerHint, len(n.TableHints)) for i, hint := range n.TableHints { node, ok := hint.Accept(v) @@ -2309,7 +2309,7 @@ func (n *InsertStmt) Restore(ctx *format.RestoreCtx) error { ctx.WriteKeyWord("INSERT ") } - if n.TableHints != nil && len(n.TableHints) != 0 { + if len(n.TableHints) != 0 { ctx.WritePlain("/*+ ") for i, tableHint := range n.TableHints { if i != 0 { @@ -2546,7 +2546,7 @@ func (n *DeleteStmt) Restore(ctx *format.RestoreCtx) error { ctx.WriteKeyWord("DELETE ") - if n.TableHints != nil && len(n.TableHints) != 0 { + if len(n.TableHints) != 0 { ctx.WritePlain("/*+ ") for i, tableHint := range n.TableHints { if i != 0 { @@ -2798,7 +2798,7 @@ func (n *UpdateStmt) Restore(ctx *format.RestoreCtx) error { ctx.WriteKeyWord("UPDATE ") - if n.TableHints != nil && len(n.TableHints) != 0 { + if len(n.TableHints) != 0 { ctx.WritePlain("/*+ ") for i, tableHint := range n.TableHints { if i != 0 { diff --git a/pkg/parser/goyacc/main.go b/pkg/parser/goyacc/main.go index f691f4ecf418c..a133aae0de269 100644 --- a/pkg/parser/goyacc/main.go +++ b/pkg/parser/goyacc/main.go @@ -468,7 +468,7 @@ type %[1]sXError struct { var tabRow sortutil.Uint64Slice for si, state := range p.Table { tabRow = tabRow[:0] - max := 0 + maxv := 0 for _, act := range state { sym := act.Sym xsym, ok := xlat[sym.Value] @@ -476,7 +476,7 @@ type %[1]sXError struct { panic("internal error 001") } - max = mathutil.Max(max, xsym) + maxv = mathutil.Max(maxv, xsym) kind, arg := act.Kind() switch kind { case 'a': @@ -486,7 +486,7 @@ type %[1]sXError struct { } tabRow = append(tabRow, uint64(xsym)<<32|uint64(arg-minArg)) } - nCells += max + nCells += maxv tabRow.Sort() col := -1 if si%5 == 0 { @@ -757,9 +757,9 @@ yynewstate: components := rule.Components typ := rule.Sym.Type - max := len(components) + maxv := len(components) if p1 := rule.Parent; p1 != nil { - max = rule.MaxParentDlr + maxv = rule.MaxParentDlr components = p1.Components } mustFormat(f, "case %d: ", r) @@ -778,11 +778,11 @@ yynewstate: if typ == "" { panic("internal error 003") } - mustFormat(f, "yyS[yypt-%d].%s", max-num, typ) + mustFormat(f, "yyS[yypt-%d].%s", maxv-num, typ) case parser.ActionValueDlrTagDlr: mustFormat(f, "parser.yyVAL.%s", part.Tag) case parser.ActionValueDlrTagNum: - mustFormat(f, "yyS[yypt-%d].%s", max-num, part.Tag) + mustFormat(f, "yyS[yypt-%d].%s", maxv-num, part.Tag) } } mustFormat(f, "\n") diff --git a/pkg/parser/lexer.go b/pkg/parser/lexer.go index a6b79b5251deb..658799a2f399e 100644 --- a/pkg/parser/lexer.go +++ b/pkg/parser/lexer.go @@ -954,13 +954,13 @@ func (s *Scanner) scanDigits() string { // scanVersionDigits scans for `min` to `max` digits (range inclusive) used in // `/*!12345 ... */` comments. -func (s *Scanner) scanVersionDigits(min, max int) { +func (s *Scanner) scanVersionDigits(minv, maxv int) { pos := s.r.pos() - for i := 0; i < max; i++ { + for i := 0; i < maxv; i++ { ch := s.r.peek() if isDigit(ch) { s.r.inc() - } else if i < min { + } else if i < minv { s.r.updatePos(pos) return } else { diff --git a/pkg/planner/core/optimizer_test.go b/pkg/planner/core/optimizer_test.go index c69a9590f17f8..8f66442a0625b 100644 --- a/pkg/planner/core/optimizer_test.go +++ b/pkg/planner/core/optimizer_test.go @@ -141,7 +141,7 @@ func TestHandleFineGrainedShuffle(t *testing.T) { plans = append(plans, &sort.BasePhysicalPlan) plans = append(plans, &recv.BasePhysicalPlan) plans = append(plans, &hashSender.BasePhysicalPlan) - clear := func(plans []*physicalop.BasePhysicalPlan) { + clearFunc := func(plans []*physicalop.BasePhysicalPlan) { for _, p := range plans { p.SetChildren(nil) p.TiFlashFineGrainedShuffleStreamCount = 0 @@ -172,7 +172,7 @@ func TestHandleFineGrainedShuffle(t *testing.T) { start := func(p base.PhysicalPlan, expStreamCount int64, expChildCount int, curChildCount int) { handleFineGrainedShuffle(nil, sctx.GetPlanCtx(), tableReader) check(p, expStreamCount, expChildCount, curChildCount) - clear(plans) + clearFunc(plans) } // Window <- Sort <- ExchangeReceiver <- ExchangeSender @@ -364,7 +364,7 @@ func TestHandleFineGrainedShuffle(t *testing.T) { require.Equal(t, uint64(16), hashSender1.TiFlashFineGrainedShuffleStreamCount) require.Equal(t, uint64(0), recv.TiFlashFineGrainedShuffleStreamCount) require.Equal(t, uint64(0), hashSender.TiFlashFineGrainedShuffleStreamCount) - clear(plans) + clearFunc(plans) require.NoError(t, failpoint.Disable(fpName2)) require.NoError(t, failpoint.Enable(fpName2, `return("8000")`)) diff --git a/pkg/planner/core/plan_cache_partition_table_test.go b/pkg/planner/core/plan_cache_partition_table_test.go index 5736fa434cdfd..0e00f51e01880 100644 --- a/pkg/planner/core/plan_cache_partition_table_test.go +++ b/pkg/planner/core/plan_cache_partition_table_test.go @@ -796,8 +796,8 @@ func nonpreparedStmtBatchPointGet(t *testing.T, ids []any, tk *testkit.TestKit, // randString generates a random string between min and max length // with [0-9a-zA-Z] // Copy from expression/bench_test.go - randString -func randString(r *rand.Rand, min, max int) string { - n := min + r.Intn(max) +func randString(r *rand.Rand, minv, maxv int) string { + n := minv + r.Intn(maxv) buf := make([]byte, n) for i := range buf { x := r.Intn(62) diff --git a/pkg/resourcemanager/poolmanager/task_manager_iterator.go b/pkg/resourcemanager/poolmanager/task_manager_iterator.go index c8c0e321de0ed..af9746c0a230f 100644 --- a/pkg/resourcemanager/poolmanager/task_manager_iterator.go +++ b/pkg/resourcemanager/poolmanager/task_manager_iterator.go @@ -40,7 +40,7 @@ func (t *TaskManager) pauseTask() { } } -func (t *TaskManager) iter(fn func(m *Meta, max time.Time) (bool, bool)) (tid uint64, result *Meta) { +func (t *TaskManager) iter(fn func(m *Meta, maxv time.Time) (bool, bool)) (tid uint64, result *Meta) { var compareTS time.Time for i := 0; i < shard; i++ { breakFind := func(int) (breakFind bool) { @@ -74,13 +74,13 @@ func (t *TaskManager) iter(fn func(m *Meta, max time.Time) (bool, bool)) (tid ui return tid, result } -func canPause(m *Meta, min time.Time) (find bool, toBreakFind bool) { +func canPause(m *Meta, minv time.Time) (find bool, toBreakFind bool) { if m.initialConcurrency < m.running.Load() { if m.running.Load() != 0 { return true, true } } - if m.createTS.Before(min) { + if m.createTS.Before(minv) { if m.running.Load() != 0 { return true, false } @@ -88,11 +88,11 @@ func canPause(m *Meta, min time.Time) (find bool, toBreakFind bool) { return false, false } -func canBoost(m *Meta, max time.Time) (find bool, toBreakFind bool) { +func canBoost(m *Meta, maxv time.Time) (find bool, toBreakFind bool) { if m.running.Load() < m.initialConcurrency { return true, true } - if m.createTS.After(max) { + if m.createTS.After(maxv) { return true, false } return false, false diff --git a/pkg/server/conn_stmt_params_test.go b/pkg/server/conn_stmt_params_test.go index a1850c7721e5d..bb808920771cc 100644 --- a/pkg/server/conn_stmt_params_test.go +++ b/pkg/server/conn_stmt_params_test.go @@ -305,7 +305,7 @@ func TestParseExecArgsAndEncode(t *testing.T) { require.Equal(t, "测试", dt[0].(*expression.Constant).Value.GetString()) } -func buildDatetimeParam(year uint16, month uint8, day uint8, hour uint8, min uint8, sec uint8, msec uint32) []byte { +func buildDatetimeParam(year uint16, month uint8, day uint8, hour uint8, minute uint8, sec uint8, msec uint32) []byte { endian := binary.LittleEndian result := []byte{mysql.TypeDatetime, 0x0, 11} @@ -313,7 +313,7 @@ func buildDatetimeParam(year uint16, month uint8, day uint8, hour uint8, min uin result = append(result, month) result = append(result, day) result = append(result, hour) - result = append(result, min) + result = append(result, minute) result = append(result, sec) result = endian.AppendUint32(result, msec) return result diff --git a/pkg/sessionctx/stmtctx/stmtctx.go b/pkg/sessionctx/stmtctx/stmtctx.go index 92f9302f40c9c..209551719a42d 100644 --- a/pkg/sessionctx/stmtctx/stmtctx.go +++ b/pkg/sessionctx/stmtctx/stmtctx.go @@ -111,9 +111,9 @@ type ReservedRowIDAlloc struct { } // Reset resets the base and max of reserved rowIDs. -func (r *ReservedRowIDAlloc) Reset(base int64, max int64) { +func (r *ReservedRowIDAlloc) Reset(base int64, maxv int64) { r.base = base - r.max = max + r.max = maxv } // Consume consumes a reserved rowID. diff --git a/pkg/statistics/scalar_test.go b/pkg/statistics/scalar_test.go index d83f1fbb8f47c..a13ff672f2aa1 100644 --- a/pkg/statistics/scalar_test.go +++ b/pkg/statistics/scalar_test.go @@ -44,8 +44,8 @@ func getTime(year, month, day int, timeType byte) types.Time { return ret } -func getTimeStamp(hour, min, sec int, timeType byte) types.Time { - ret := types.NewTime(types.FromDate(2017, 1, 1, hour, min, sec, 0), timeType, 0) +func getTimeStamp(hour, minute, sec int, timeType byte) types.Time { + ret := types.NewTime(types.FromDate(2017, 1, 1, hour, minute, sec, 0), timeType, 0) return ret } diff --git a/pkg/store/mockstore/unistore/tikv/mock_region.go b/pkg/store/mockstore/unistore/tikv/mock_region.go index e9e691bd555f9..cdbee6f6550ea 100644 --- a/pkg/store/mockstore/unistore/tikv/mock_region.go +++ b/pkg/store/mockstore/unistore/tikv/mock_region.go @@ -113,9 +113,9 @@ func (rm *MockRegionManager) AllocID() uint64 { // AllocIDs allocs ids with the given number n. func (rm *MockRegionManager) AllocIDs(n int) []uint64 { - max := atomic.AddUint64(&rm.id, uint64(n)) + maxID := atomic.AddUint64(&rm.id, uint64(n)) ids := make([]uint64, n) - base := max - uint64(n-1) + base := maxID - uint64(n-1) for i := range ids { ids[i] = base + uint64(i) } diff --git a/pkg/structure/list.go b/pkg/structure/list.go index 3211668f01d02..254559a0ab99b 100644 --- a/pkg/structure/list.go +++ b/pkg/structure/list.go @@ -238,10 +238,10 @@ func (t *TxStructure) loadListMeta(metaKey []byte) (listMeta, error) { return meta, nil } -func adjustIndex(index int64, min, max int64) int64 { +func adjustIndex(index int64, minv, maxv int64) int64 { if index >= 0 { - return index + min + return index + minv } - return index + max + return index + maxv } diff --git a/pkg/table/table.go b/pkg/table/table.go index 90e5708b4397e..e1e5183302f61 100644 --- a/pkg/table/table.go +++ b/pkg/table/table.go @@ -502,11 +502,11 @@ func AllocAutoIncrementValue(ctx context.Context, t Table, sctx sessionctx.Conte defer r.End() increment, offset := getIncrementAndOffset(sctx.GetSessionVars()) alloc := t.Allocators(sctx.GetTableCtx()).Get(autoid.AutoIncrementType) - _, max, err := alloc.Alloc(ctx, uint64(1), int64(increment), int64(offset)) + _, maxv, err := alloc.Alloc(ctx, uint64(1), int64(increment), int64(offset)) if err != nil { return 0, err } - return max, err + return maxv, err } // AllocBatchAutoIncrementValue allocates batch auto_increment value for rows, returning firstID, increment and err. @@ -514,13 +514,13 @@ func AllocAutoIncrementValue(ctx context.Context, t Table, sctx sessionctx.Conte func AllocBatchAutoIncrementValue(ctx context.Context, t Table, sctx sessionctx.Context, N int) ( /* firstID */ int64 /* increment */, int64 /* err */, error) { increment1, offset := getIncrementAndOffset(sctx.GetSessionVars()) alloc := t.Allocators(sctx.GetTableCtx()).Get(autoid.AutoIncrementType) - min, max, err := alloc.Alloc(ctx, uint64(N), int64(increment1), int64(offset)) + minv, maxv, err := alloc.Alloc(ctx, uint64(N), int64(increment1), int64(offset)) if err != nil { - return min, max, err + return minv, maxv, err } // SeekToFirstAutoIDUnSigned seeks to first autoID. Because AutoIncrement always allocate from 1, // signed and unsigned value can be unified as the unsigned handle. - nr := int64(autoid.SeekToFirstAutoIDUnSigned(uint64(min), uint64(increment1), uint64(offset))) + nr := int64(autoid.SeekToFirstAutoIDUnSigned(uint64(minv), uint64(increment1), uint64(offset))) return nr, int64(increment1), nil } diff --git a/pkg/ttl/cache/table.go b/pkg/ttl/cache/table.go index 48c1c7b63d560..e9183185b4e4e 100644 --- a/pkg/ttl/cache/table.go +++ b/pkg/ttl/cache/table.go @@ -189,11 +189,11 @@ func (t *PhysicalTable) ValidateKeyPrefix(key []types.Datum) error { return nil } -var mockExpireTimeKey struct{} +type mockExpireTimeKey struct{} // SetMockExpireTime can only used in test func SetMockExpireTime(ctx context.Context, tm time.Time) context.Context { - return context.WithValue(ctx, mockExpireTimeKey, tm) + return context.WithValue(ctx, mockExpireTimeKey{}, tm) } // EvalExpireTime returns the expired time. @@ -248,7 +248,7 @@ func EvalExpireTime(now time.Time, interval string, unit ast.TimeUnitType) (time func (t *PhysicalTable) EvalExpireTime(ctx context.Context, se session.Session, now time.Time) (time.Time, error) { if intest.InTest { - if tm, ok := ctx.Value(mockExpireTimeKey).(time.Time); ok { + if tm, ok := ctx.Value(mockExpireTimeKey{}).(time.Time); ok { return tm, nil } } diff --git a/pkg/types/datum.go b/pkg/types/datum.go index 5eb5bb873aea1..677d969bdfba9 100644 --- a/pkg/types/datum.go +++ b/pkg/types/datum.go @@ -2526,62 +2526,62 @@ func CloneRow(dr []Datum) []Datum { } // GetMaxValue returns the max value datum for each type. -func GetMaxValue(ft *FieldType) (max Datum) { +func GetMaxValue(ft *FieldType) (maxVal Datum) { switch ft.GetType() { case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong: if mysql.HasUnsignedFlag(ft.GetFlag()) { - max.SetUint64(IntegerUnsignedUpperBound(ft.GetType())) + maxVal.SetUint64(IntegerUnsignedUpperBound(ft.GetType())) } else { - max.SetInt64(IntegerSignedUpperBound(ft.GetType())) + maxVal.SetInt64(IntegerSignedUpperBound(ft.GetType())) } case mysql.TypeFloat: - max.SetFloat32(float32(GetMaxFloat(ft.GetFlen(), ft.GetDecimal()))) + maxVal.SetFloat32(float32(GetMaxFloat(ft.GetFlen(), ft.GetDecimal()))) case mysql.TypeDouble: - max.SetFloat64(GetMaxFloat(ft.GetFlen(), ft.GetDecimal())) + maxVal.SetFloat64(GetMaxFloat(ft.GetFlen(), ft.GetDecimal())) case mysql.TypeString, mysql.TypeVarString, mysql.TypeVarchar, mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob: // codec.Encode KindMaxValue, to avoid import circle bytes := []byte{250} - max.SetString(string(bytes), ft.GetCollate()) + maxVal.SetString(string(bytes), ft.GetCollate()) case mysql.TypeNewDecimal: - max.SetMysqlDecimal(NewMaxOrMinDec(false, ft.GetFlen(), ft.GetDecimal())) + maxVal.SetMysqlDecimal(NewMaxOrMinDec(false, ft.GetFlen(), ft.GetDecimal())) case mysql.TypeDuration: - max.SetMysqlDuration(Duration{Duration: MaxTime}) + maxVal.SetMysqlDuration(Duration{Duration: MaxTime}) case mysql.TypeDate, mysql.TypeDatetime, mysql.TypeTimestamp: if ft.GetType() == mysql.TypeDate || ft.GetType() == mysql.TypeDatetime { - max.SetMysqlTime(NewTime(MaxDatetime, ft.GetType(), 0)) + maxVal.SetMysqlTime(NewTime(MaxDatetime, ft.GetType(), 0)) } else { - max.SetMysqlTime(MaxTimestamp) + maxVal.SetMysqlTime(MaxTimestamp) } } return } // GetMinValue returns the min value datum for each type. -func GetMinValue(ft *FieldType) (min Datum) { +func GetMinValue(ft *FieldType) (minVal Datum) { switch ft.GetType() { case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong: if mysql.HasUnsignedFlag(ft.GetFlag()) { - min.SetUint64(0) + minVal.SetUint64(0) } else { - min.SetInt64(IntegerSignedLowerBound(ft.GetType())) + minVal.SetInt64(IntegerSignedLowerBound(ft.GetType())) } case mysql.TypeFloat: - min.SetFloat32(float32(-GetMaxFloat(ft.GetFlen(), ft.GetDecimal()))) + minVal.SetFloat32(float32(-GetMaxFloat(ft.GetFlen(), ft.GetDecimal()))) case mysql.TypeDouble: - min.SetFloat64(-GetMaxFloat(ft.GetFlen(), ft.GetDecimal())) + minVal.SetFloat64(-GetMaxFloat(ft.GetFlen(), ft.GetDecimal())) case mysql.TypeString, mysql.TypeVarString, mysql.TypeVarchar, mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob: // codec.Encode KindMinNotNull, to avoid import circle bytes := []byte{1} - min.SetString(string(bytes), ft.GetCollate()) + minVal.SetString(string(bytes), ft.GetCollate()) case mysql.TypeNewDecimal: - min.SetMysqlDecimal(NewMaxOrMinDec(true, ft.GetFlen(), ft.GetDecimal())) + minVal.SetMysqlDecimal(NewMaxOrMinDec(true, ft.GetFlen(), ft.GetDecimal())) case mysql.TypeDuration: - min.SetMysqlDuration(Duration{Duration: MinTime}) + minVal.SetMysqlDuration(Duration{Duration: MinTime}) case mysql.TypeDate, mysql.TypeDatetime, mysql.TypeTimestamp: if ft.GetType() == mysql.TypeDate || ft.GetType() == mysql.TypeDatetime { - min.SetMysqlTime(NewTime(MinDatetime, ft.GetType(), 0)) + minVal.SetMysqlTime(NewTime(MinDatetime, ft.GetType(), 0)) } else { - min.SetMysqlTime(MinTimestamp) + minVal.SetMysqlTime(MinTimestamp) } } return diff --git a/pkg/util/cgroup/cgroup.go b/pkg/util/cgroup/cgroup.go index 258e5eb733fa3..12194fde1b919 100644 --- a/pkg/util/cgroup/cgroup.go +++ b/pkg/util/cgroup/cgroup.go @@ -95,8 +95,8 @@ func SetGOMAXPROCS() (func(), error) { log.Info("maxprocs: No GOMAXPROCS change to reset") } - if max, exists := os.LookupEnv(_maxProcsKey); exists { - log.Info(fmt.Sprintf("maxprocs: Honoring GOMAXPROCS=%q as set in environment", max)) + if maxv, exists := os.LookupEnv(_maxProcsKey); exists { + log.Info(fmt.Sprintf("maxprocs: Honoring GOMAXPROCS=%q as set in environment", maxv)) return undoNoop, nil } diff --git a/pkg/util/dbterror/ddl_terror.go b/pkg/util/dbterror/ddl_terror.go index 31a9defe7b165..c75a409507177 100644 --- a/pkg/util/dbterror/ddl_terror.go +++ b/pkg/util/dbterror/ddl_terror.go @@ -180,7 +180,7 @@ var ( // ErrFkDupName returns for duplicated FK name. ErrFkDupName = ClassDDL.NewStd(mysql.ErrFkDupName) // ErrInvalidDDLState returns for invalid ddl model object state. - ErrInvalidDDLState = ClassDDL.NewStdErr(mysql.ErrInvalidDDLState, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrInvalidDDLState].Raw), nil)) + ErrInvalidDDLState = ClassDDL.NewStdErr(mysql.ErrInvalidDDLState, parser_mysql.Message(mysql.MySQLErrName[mysql.ErrInvalidDDLState].Raw, nil)) // ErrUnsupportedModifyPrimaryKey returns an error when add or drop the primary key. // It's exported for testing. ErrUnsupportedModifyPrimaryKey = ClassDDL.NewStdErr(mysql.ErrUnsupportedDDLOperation, parser_mysql.Message(fmt.Sprintf(mysql.MySQLErrName[mysql.ErrUnsupportedDDLOperation].Raw, "%s primary key"), nil)) diff --git a/pkg/util/dbutil/common.go b/pkg/util/dbutil/common.go index b21564ba2ed86..901503940acdf 100644 --- a/pkg/util/dbutil/common.go +++ b/pkg/util/dbutil/common.go @@ -272,7 +272,7 @@ func GetMinMaxValue(ctx context.Context, db QueryExecutor, schema, table, column ColumnName(column), collation, ColumnName(column), collation, TableName(schema, table), limitRange) log.Debug("GetMinMaxValue", zap.String("sql", query), zap.Reflect("args", limitArgs)) - var min, max sql.NullString + var minv, maxv sql.NullString rows, err := db.QueryContext(ctx, query, limitArgs...) if err != nil { return "", "", errors.Trace(err) @@ -280,18 +280,18 @@ func GetMinMaxValue(ctx context.Context, db QueryExecutor, schema, table, column defer rows.Close() for rows.Next() { - err = rows.Scan(&min, &max) + err = rows.Scan(&minv, &maxv) if err != nil { return "", "", errors.Trace(err) } } - if !min.Valid || !max.Valid { + if !minv.Valid || !maxv.Valid { // don't have any data return "", "", ErrNoData } - return min.String, max.String, errors.Trace(rows.Err()) + return minv.String, maxv.String, errors.Trace(rows.Err()) } // GetTimeZoneOffset is to get offset of timezone. diff --git a/pkg/util/fastrand/BUILD.bazel b/pkg/util/fastrand/BUILD.bazel index ba17841cba1f3..d06067c2be322 100644 --- a/pkg/util/fastrand/BUILD.bazel +++ b/pkg/util/fastrand/BUILD.bazel @@ -5,7 +5,6 @@ go_library( srcs = [ "random.go", "runtime.go", - "runtime_1.22.go", ], importpath = "github.com/pingcap/tidb/pkg/util/fastrand", visibility = ["//visibility:public"], diff --git a/pkg/util/fastrand/runtime.go b/pkg/util/fastrand/runtime.go index dda6549090de2..6386a44f2fa71 100644 --- a/pkg/util/fastrand/runtime.go +++ b/pkg/util/fastrand/runtime.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build !go1.22 - package fastrand import ( @@ -22,5 +20,5 @@ import ( // Uint32 returns a lock free uint32 value. // -//go:linkname Uint32 runtime.fastrand +//go:linkname Uint32 runtime.cheaprand func Uint32() uint32 diff --git a/pkg/util/fastrand/runtime_1.22.go b/pkg/util/fastrand/runtime_1.22.go deleted file mode 100644 index 0e8cf2a87a396..0000000000000 --- a/pkg/util/fastrand/runtime_1.22.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2024 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. - -//go:build go1.22 - -package fastrand - -import ( - _ "unsafe" // required by go:linkname -) - -// Uint32 returns a lock free uint32 value. -// -//go:linkname Uint32 runtime.cheaprand -func Uint32() uint32 diff --git a/pkg/util/hack/hack.go b/pkg/util/hack/hack.go index 2bebee59fa1f3..34a01ae6360cf 100644 --- a/pkg/util/hack/hack.go +++ b/pkg/util/hack/hack.go @@ -53,7 +53,7 @@ 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`) { + if strings.Contains(runtime.Version(), `go1.21`) || strings.Contains(runtime.Version(), `go1.22`) { LoadFactorNum = 12 } } diff --git a/pkg/util/importer/data.go b/pkg/util/importer/data.go index 80b487ae69307..3cb5b304290e7 100644 --- a/pkg/util/importer/data.go +++ b/pkg/util/importer/data.go @@ -37,7 +37,7 @@ func newDatum() *datum { return &datum{intValue: -1, step: 1} } -func (d *datum) setInitInt64Value(step int64, min int64, max int64) { +func (d *datum) setInitInt64Value(step int64, minv, maxv int64) { d.Lock() defer d.Unlock() @@ -47,13 +47,13 @@ func (d *datum) setInitInt64Value(step int64, min int64, max int64) { d.step = step - if min != -1 { - d.minIntValue = min - d.intValue = min + if minv != -1 { + d.minIntValue = minv + d.intValue = minv } - if min < max { - d.maxIntValue = max + if minv < maxv { + d.maxIntValue = maxv d.useRange = true } diff --git a/pkg/util/importer/db.go b/pkg/util/importer/db.go index 9194da31ea842..6e40f30241604 100644 --- a/pkg/util/importer/db.go +++ b/pkg/util/importer/db.go @@ -28,39 +28,39 @@ import ( "go.uber.org/zap" ) -func intRangeValue(column *column, min int64, max int64) (maxInt int64, minInt int64) { +func intRangeValue(column *column, minv, maxv int64) (maxInt, minInt int64) { var err error if len(column.min) > 0 { - min, err = strconv.ParseInt(column.min, 10, 64) + minv, err = strconv.ParseInt(column.min, 10, 64) if err != nil { log.Fatal("intRangeValue", zap.Error(err)) } if len(column.max) > 0 { - max, err = strconv.ParseInt(column.max, 10, 64) + maxv, err = strconv.ParseInt(column.max, 10, 64) if err != nil { log.Fatal("intRangeValue", zap.Error(err)) } } } - return min, max + return minv, maxv } -func randInt64Value(column *column, min int64, max int64) int64 { +func randInt64Value(column *column, minv, maxv int64) int64 { if len(column.set) > 0 { idx := randInt(0, len(column.set)-1) data, _ := strconv.ParseInt(column.set[idx], 10, 64) return data } - min, max = intRangeValue(column, min, max) - return randInt64(min, max) + minv, maxv = intRangeValue(column, minv, maxv) + return randInt64(minv, maxv) } -func uniqInt64Value(column *column, min int64, max int64) int64 { - min, max = intRangeValue(column, min, max) - column.data.setInitInt64Value(column.step, min, max) +func uniqInt64Value(column *column, minv int64, maxv int64) int64 { + minv, maxv = intRangeValue(column, minv, maxv) + column.data.setInitInt64Value(column.step, minv, maxv) return column.data.uniqInt64() } diff --git a/pkg/util/importer/rand.go b/pkg/util/importer/rand.go index b039dde424e27..07eed3f184fbd 100644 --- a/pkg/util/importer/rand.go +++ b/pkg/util/importer/rand.go @@ -34,17 +34,17 @@ const ( letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits ) -func randInt(min int, max int) int { - return min + rand.Intn(max-min+1) // nolint:gosec +func randInt(minv, maxv int) int { + return minv + rand.Intn(maxv-minv+1) // nolint:gosec } -func randInt64(min int64, max int64) int64 { - return min + rand.Int63n(max-min+1) // nolint:gosec +func randInt64(minv int64, maxv int64) int64 { + return minv + rand.Int63n(maxv-minv+1) // nolint:gosec } // nolint: unused, deadcode -func randFloat64(min int64, max int64, prec int) float64 { - value := float64(randInt64(min, max)) +func randFloat64(minv int64, maxv int64, prec int) float64 { + value := float64(randInt64(minv, maxv)) fvalue := strconv.FormatFloat(value, 'f', prec, 64) value, _ = strconv.ParseFloat(fvalue, 64) return value @@ -81,71 +81,71 @@ func randDuration(n time.Duration) time.Duration { return time.Duration(duration) } -func randDate(min string, max string) string { - if len(min) == 0 { +func randDate(minv string, maxv string) string { + if len(minv) == 0 { year := time.Now().Year() month := randInt(1, 12) day := randInt(1, 28) return fmt.Sprintf("%04d-%02d-%02d", year, month, day) } - minTime, _ := time.Parse(dateFormat, min) - if len(max) == 0 { + minTime, _ := time.Parse(dateFormat, minv) + if len(maxv) == 0 { t := minTime.Add(time.Duration(randInt(0, 365)) * 24 * time.Hour) return fmt.Sprintf("%04d-%02d-%02d", t.Year(), t.Month(), t.Day()) } - maxTime, _ := time.Parse(dateFormat, max) + maxTime, _ := time.Parse(dateFormat, maxv) days := int(maxTime.Sub(minTime).Hours() / 24) t := minTime.Add(time.Duration(randInt(0, days)) * 24 * time.Hour) return fmt.Sprintf("%04d-%02d-%02d", t.Year(), t.Month(), t.Day()) } -func randTime(min string, max string) string { - if len(min) == 0 || len(max) == 0 { +func randTime(minv, maxv string) string { + if len(minv) == 0 || len(maxv) == 0 { hour := randInt(0, 23) - min := randInt(0, 59) + minute := randInt(0, 59) sec := randInt(0, 59) - return fmt.Sprintf("%02d:%02d:%02d", hour, min, sec) + return fmt.Sprintf("%02d:%02d:%02d", hour, minute, sec) } - minTime, _ := time.Parse(timeFormat, min) - maxTime, _ := time.Parse(timeFormat, max) + minTime, _ := time.Parse(timeFormat, minv) + maxTime, _ := time.Parse(timeFormat, maxv) seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) return fmt.Sprintf("%02d:%02d:%02d", t.Hour(), t.Minute(), t.Second()) } -func randTimestamp(min string, max string) string { - if len(min) == 0 { +func randTimestamp(minv string, maxv string) string { + if len(minv) == 0 { year := time.Now().Year() month := randInt(1, 12) day := randInt(1, 28) hour := randInt(0, 23) - min := randInt(0, 59) + minute := randInt(0, 59) sec := randInt(0, 59) - return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, min, sec) + return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, sec) } - minTime, _ := time.Parse(dateTimeFormat, min) - if len(max) == 0 { + minTime, _ := time.Parse(dateTimeFormat, minv) + if len(maxv) == 0 { t := minTime.Add(time.Duration(randInt(0, 365)) * 24 * time.Hour) return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) } - maxTime, _ := time.Parse(dateTimeFormat, max) + maxTime, _ := time.Parse(dateTimeFormat, maxv) seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) return fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) } -func randYear(min string, max string) string { - if len(min) == 0 || len(max) == 0 { +func randYear(minv, maxv string) string { + if len(minv) == 0 || len(maxv) == 0 { return fmt.Sprintf("%04d", time.Now().Year()-randInt(0, 10)) } - minTime, _ := time.Parse(yearFormat, min) - maxTime, _ := time.Parse(yearFormat, max) + minTime, _ := time.Parse(yearFormat, minv) + maxTime, _ := time.Parse(yearFormat, maxv) seconds := int(maxTime.Sub(minTime).Seconds()) t := minTime.Add(time.Duration(randInt(0, seconds)) * time.Second) return fmt.Sprintf("%04d", t.Year()) diff --git a/pkg/util/intset/fast_int_set_test.go b/pkg/util/intset/fast_int_set_test.go index c041863409843..d06b49939f6cf 100644 --- a/pkg/util/intset/fast_int_set_test.go +++ b/pkg/util/intset/fast_int_set_test.go @@ -469,11 +469,11 @@ func TestFastIntSetAddRange(t *testing.T) { }) } - max := smallCutOff + 20 + maxv := smallCutOff + 20 // Test all O(n^2) sub-intervals of [from,to] in the interval // [-5, smallCutoff + 20]. - for from := -5; from <= max; from++ { - for to := from; to <= max; to++ { + for from := -5; from <= maxv; from++ { + for to := from; to <= maxv; to++ { var set FastIntSet set.AddRange(from, to) assertSet(&set, from, to) diff --git a/pkg/util/mathutil/math.go b/pkg/util/mathutil/math.go index db3987d07224d..0650c2be54b3d 100644 --- a/pkg/util/mathutil/math.go +++ b/pkg/util/mathutil/math.go @@ -70,32 +70,32 @@ func IsFinite(f float64) bool { // Max returns the largest one from its arguments. func Max[T constraints.Ordered](x T, xs ...T) T { - max := x + maxv := x for _, n := range xs { - if n > max { - max = n + if n > maxv { + maxv = n } } - return max + return maxv } // Min returns the smallest one from its arguments. func Min[T constraints.Ordered](x T, xs ...T) T { - min := x + minv := x for _, n := range xs { - if n < min { - min = n + if n < minv { + minv = n } } - return min + return minv } // Clamp restrict a value to a certain interval. -func Clamp[T constraints.Ordered](n, min, max T) T { - if n >= max { - return max - } else if n <= min { - return min +func Clamp[T constraints.Ordered](n, minv, maxv T) T { + if n >= maxv { + return maxv + } else if n <= minv { + return minv } return n } diff --git a/pkg/util/paging/paging.go b/pkg/util/paging/paging.go index 64bca1b12ccdf..34220762cfc20 100644 --- a/pkg/util/paging/paging.go +++ b/pkg/util/paging/paging.go @@ -31,17 +31,17 @@ const ( ) // GrowPagingSize grows the paging size and ensures it does not exceed MaxPagingSize -func GrowPagingSize(size uint64, max uint64) uint64 { - if max < MaxPagingSize { +func GrowPagingSize(size uint64, maxv uint64) uint64 { + if maxv < MaxPagingSize { // Defensive programing, for example, call with max = 0. // max should never less than MaxPagingSize. // Otherwise the session variable maybe wrong, or the distsql request does not obey the session variable setting. - max = MaxPagingSize + maxv = MaxPagingSize } size <<= 1 - if size > max { - return max + if size > maxv { + return maxv } return size } diff --git a/pkg/util/parser/ast.go b/pkg/util/parser/ast.go index f730a07098c2d..439a30ecfdd2b 100644 --- a/pkg/util/parser/ast.go +++ b/pkg/util/parser/ast.go @@ -79,7 +79,7 @@ func SimpleCases(node ast.StmtNode, defaultDB, origin string) (s string, ok bool if !ok { return "", false } - if insert.Select != nil || insert.Setlist || insert.OnDuplicate != nil || (insert.TableHints != nil && len(insert.TableHints) != 0) { + if insert.Select != nil || insert.Setlist || insert.OnDuplicate != nil || len(insert.TableHints) != 0 { return "", false } join := insert.Table.TableRefs