From 96da6b425cf35b694a079cfdfb6e3d7d93f5ea42 Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Fri, 29 Nov 2024 13:55:21 +0100 Subject: [PATCH] DEPS: bump grpc to pick up Decompressor patch See https://github.com/cockroachdb/grpc-go/releases/tag/v1.68.0-noalpncheck%2Bdecompsize: Re-instate (Decompressor).DecompressedSize optimization This is a) for parity with how gRPC v1.56.3 worked. But also it showed up as a giant regression in allocations, as we were now going through `io.Copy` which allocates a temporary 32KiB buffer. Our payloads are often much smaller. --- DEPS.bzl | 6 +++--- build/bazelutil/distdir_files.bzl | 2 +- go.mod | 11 ++++++++--- go.sum | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/DEPS.bzl b/DEPS.bzl index 5faebfe2d6c3..6d47c584c752 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -11479,10 +11479,10 @@ def go_deps(): name = "org_golang_google_grpc", build_file_proto_mode = "disable_global", importpath = "google.golang.org/grpc", - sha256 = "69298d07c23c6fd53d5a8e1fc30f9f697875aa8367074306bb57cf5487fbf927", - strip_prefix = "github.com/cockroachdb/grpc-go@v1.68.0-noalpncheck", + sha256 = "8378992958322f6f002fd9fddd621055ddba00653d30b4fa3b16bc4faef9a0e9", + strip_prefix = "github.com/cockroachdb/grpc-go@v1.68.0-noalpncheck.0.20241129124825-5710e83f714e", urls = [ - "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/grpc-go/com_github_cockroachdb_grpc_go-v1.68.0-noalpncheck.zip", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/grpc-go/com_github_cockroachdb_grpc_go-v1.68.0-noalpncheck.0.20241129124825-5710e83f714e.zip", ], ) go_repository( diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index f8e8281c196d..92761cd1b131 100644 --- a/build/bazelutil/distdir_files.bzl +++ b/build/bazelutil/distdir_files.bzl @@ -349,7 +349,7 @@ DISTDIR_FILES = { "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/go-test-teamcity/com_github_cockroachdb_go_test_teamcity-v0.0.0-20191211140407-cff980ad0a55.zip": "bac30148e525b79d004da84d16453ddd2d5cd20528e9187f1d7dac708335674b", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gogoproto/com_github_cockroachdb_gogoproto-v1.3.3-0.20241118145159-46874edb1b83.zip": "1382d1ef3a015855f8268c595e2afeef7ae7374b7e27c2181b27a42c2fb639a7", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e", - "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/grpc-go/com_github_cockroachdb_grpc_go-v1.68.0-noalpncheck.zip": "69298d07c23c6fd53d5a8e1fc30f9f697875aa8367074306bb57cf5487fbf927", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/grpc-go/com_github_cockroachdb_grpc_go-v1.68.0-noalpncheck.0.20241129124825-5710e83f714e.zip": "8378992958322f6f002fd9fddd621055ddba00653d30b4fa3b16bc4faef9a0e9", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20230118201751-21c54148d20b.zip": "ca7776f47e5fecb4c495490a679036bfc29d95bd7625290cfdb9abb0baf97476", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/metamorphic/com_github_cockroachdb_metamorphic-v0.0.0-20231108215700-4ba948b56895.zip": "28c8cf42192951b69378cf537be5a9a43f2aeb35542908cc4fe5f689505853ea", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241125211801-f5057c948b65.zip": "7139420e4eb4a61d1b1b01e921eb12480d9b5ae1045509178533d492d8dc49a6", diff --git a/go.mod b/go.mod index 68b51ab2ba35..1b3601b18c8a 100644 --- a/go.mod +++ b/go.mod @@ -493,7 +493,12 @@ replace golang.org/x/time => github.com/cockroachdb/x-time v0.3.1-0.202305251236 replace github.com/gogo/protobuf => github.com/cockroachdb/gogoproto v1.3.3-0.20241118145159-46874edb1b83 -// See https://github.com/cockroachdb/cockroach/issues/136367. // We must use the noalpncheck version of grpc-go until the MinSupportedVersion -// also uses gRPC at v1.68.0 or above. -replace google.golang.org/grpc v1.68.0 => github.com/cockroachdb/grpc-go v1.68.0-noalpncheck +// also uses gRPC at v1.68.0 or above. Also, v1.68.0 lost an optimization that +// allowed the Decompressor (snappyDecompressor) in our case to announce how many +// bytes the decompressed data will occupy. This led to a blow-up in allocated bytes +// for workloads in which requests weigh in at less than 32KiB, which is common. +// +// See https://github.com/cockroachdb/cockroach/issues/136367 for `noalpncheck`. +// See https://github.com/cockroachdb/cockroach/pull/136278#issuecomment-2506494078 for `decompsize`. +replace google.golang.org/grpc v1.68.0 => github.com/cockroachdb/grpc-go v1.68.0-noalpncheck.0.20241129124825-5710e83f714e diff --git a/go.sum b/go.sum index fce8624273fd..7480a52f63c5 100644 --- a/go.sum +++ b/go.sum @@ -538,8 +538,8 @@ github.com/cockroachdb/gogoproto v1.3.3-0.20241118145159-46874edb1b83 h1:PVow08b github.com/cockroachdb/gogoproto v1.3.3-0.20241118145159-46874edb1b83/go.mod h1:wIrkfXJOUk95vmhcdlmaou6FpqbEExZWBM7EAtKDvYg= github.com/cockroachdb/gostdlib v1.19.0 h1:cSISxkVnTlWhTkyple/T6NXzOi5659FkhxvUgZv+Eb0= github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTymPZUKMfURjBtY= -github.com/cockroachdb/grpc-go v1.68.0-noalpncheck h1:odM3/chhjRTmDlD/3ndnBNsswAbbImC1RQCf+qrtO98= -github.com/cockroachdb/grpc-go v1.68.0-noalpncheck/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +github.com/cockroachdb/grpc-go v1.68.0-noalpncheck.0.20241129124825-5710e83f714e h1:GQwFV3zGH//OOqgUUhV2rL22w6SL9MAau0MlDRzFS6E= +github.com/cockroachdb/grpc-go v1.68.0-noalpncheck.0.20241129124825-5710e83f714e/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=