Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
136497: kv: use crtime.Mono in sendPartialBatch r=RaduBerinde a=RaduBerinde

Informs: cockroachdb#133315
Release note: None

136519: build: update `krb5` to 1.21.3 r=sanchit-CRL a=rickystewart

Epic: none
Release note: None

136534: go.mod: bump Pebble to 1724e81ecbc4 r=RaduBerinde a=jbowens

Changes:

 * [`1724e81e`](cockroachdb/pebble@1724e81e) colblk: fix handle misuse in TestIndexIterInitHandle
 * [`21866e88`](cockroachdb/pebble@21866e88) wal: prevent negative durations

Release note: none.
Epic: none.

Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Ricky Stewart <[email protected]>
Co-authored-by: Jackson Owens <[email protected]>
  • Loading branch information
4 people committed Dec 3, 2024
4 parents db1d1c0 + 5b363bb + 2399af6 + 59ea6bb commit 9e20aab
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 47 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1845,10 +1845,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "7139420e4eb4a61d1b1b01e921eb12480d9b5ae1045509178533d492d8dc49a6",
strip_prefix = "github.com/cockroachdb/[email protected]20241125211801-f5057c948b65",
sha256 = "207a59abdec19c21c46e4a0779201d84a0ad995282f84007926b90ec35cc8dc9",
strip_prefix = "github.com/cockroachdb/[email protected]20241128154944-1724e81ecbc4",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241125211801-f5057c948b65.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241128154944-1724e81ecbc4.zip",
],
)
go_repository(
Expand Down
34 changes: 17 additions & 17 deletions build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ DISTDIR_FILES = {
"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/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",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20241128154944-1724e81ecbc4.zip": "207a59abdec19c21c46e4a0779201d84a0ad995282f84007926b90ec35cc8dc9",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.5.zip": "11b30528eb0dafc8bc1a5ba39d81277c257cbe6946a7564402f588357c164560",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/stress/com_github_cockroachdb_stress-v0.0.0-20220803192808-1806698b1b7b.zip": "3fda531795c600daf25532a4f98be2a1335cd1e5e182c72789bca79f5f69fcc1",
Expand Down Expand Up @@ -1211,22 +1211,22 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/public-bazel-artifacts/bazel/rules_proto-6.0.2.tar.gz": "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295",
"https://storage.googleapis.com/public-bazel-artifacts/bazel/rules_python-0.1.0.tar.gz": "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
"https://storage.googleapis.com/public-bazel-artifacts/bazel/sqllogictest-96138842571462ed9a697bff590828d8f6356a2f.tar.gz": "f7e0d659fbefb65f32d4c5d146cba4c73c43e0e96f9b217a756c82be17451f97",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libgeos_foreign.linux.20240419-195217.tar.gz": "3c5ffe12ea3e1b92f80f98e509c206b66a780b175c9aba2b085f1c39377c982f",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libgeos_foreign.linuxarm.20240419-195217.tar.gz": "820b804268e8f69a9f5592d03a5834bb202939184c623f6aca8a00863c4755fd",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libgeos_foreign.macos.20240419-195217.tar.gz": "ad84331c25abae7bec02e54556e38804d5eab1f14c542a369660b040ca25ee14",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libgeos_foreign.macosarm.20240419-195217.tar.gz": "9ec86dcf655cb441a3dbed29897b27b2fbc37830816d07f1da58e197c332a3bb",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libjemalloc_foreign.linux.20240419-195217.tar.gz": "282967fa0b7ab2d134da7485239ea0e816b4c2b0ca2b59a7fcd30f6d7d0fce3c",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libjemalloc_foreign.linuxarm.20240419-195217.tar.gz": "2eb8217364c5592ea8061ee1aef7406c034cc43a543fb7871fd28c59b5765a5c",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libjemalloc_foreign.macos.20240419-195217.tar.gz": "180dbd0156b89079fedacc9f2d8f0fb3082616ee21ffc1a3f6d1a99a67dfc56d",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libjemalloc_foreign.macosarm.20240419-195217.tar.gz": "9a3fae2482dd837842e755a10b70d7a15b3ff9f431b81e63efc2f20a1885d174",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libjemalloc_foreign.windows.20240419-195217.tar.gz": "4197f25032d45b6e8acb6446914f6153c0fc48e0d75d2eba99d58806622fcc98",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libkrb5_foreign.linux.20240419-195217.tar.gz": "5e392cd33a5c16ed8f618a21f311cee0518fbfa2fbc7800c819cb0d0aacf833b",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libkrb5_foreign.linuxarm.20240419-195217.tar.gz": "6796b65289835622ee1b634a47cc784c5b764ca63959d77ccc54c66c5afd708d",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libproj_foreign.linux.20240419-195217.tar.gz": "94f62ceaad3ca235ff932b2256b314a21a62774efc3e0d898c05f5d1d74b7578",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libproj_foreign.linuxarm.20240419-195217.tar.gz": "06eedc730402719f444349935ca3db928e510cfd95f3aa32eafbc3fdcc10c5b2",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libproj_foreign.macos.20240419-195217.tar.gz": "4b4dadf30e225693723612ede7fc5138eb1ad1b863db744c52099535dbdc3c00",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libproj_foreign.macosarm.20240419-195217.tar.gz": "3e3220bd83009de29185772be26022ae219cb006eae1d8dba87292206ce9f4ea",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20240419-195217/libproj_foreign.windows.20240419-195217.tar.gz": "8284b57f832ab3c5353860ad715e8844c93bf6822b01cb5108b5b494ea90a2dc",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libgeos_foreign.linux.20241202-211651.tar.gz": "ae787cc08fdf6b511859c5c67e5b834a9f6cdb57aa49d32f9226a984bbeb2af5",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libgeos_foreign.linuxarm.20241202-211651.tar.gz": "edaac8486c7da5a87c3857e52223a35e3533286786c0109847de1fd142884c2a",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libgeos_foreign.macos.20241202-211651.tar.gz": "2b762d57dd877e54fee402afbdebe433bbd4ee636accf782ec44633c6f1e380b",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libgeos_foreign.macosarm.20241202-211651.tar.gz": "401252bba664cbbd9d9329fc068b04b0cc01e390e7c7f419a6cba081c6e950c2",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libjemalloc_foreign.linux.20241202-211651.tar.gz": "21059f2c065b35fa7cd39a19f882e03dbab24480d0eb787d03dd458bbba92b4a",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libjemalloc_foreign.linuxarm.20241202-211651.tar.gz": "745930cc073b09f5a25690e7b3a273a96dd6943402ba425ad916c9555a2a016c",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libjemalloc_foreign.macos.20241202-211651.tar.gz": "255632b4fddebd7cb4799f255251a8137256e207a402900ca7de7be496a1a238",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libjemalloc_foreign.macosarm.20241202-211651.tar.gz": "0a73f3f88183ce7aacb8a105077b32ff6ee77216adc776683cf64f75eb9a6513",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libjemalloc_foreign.windows.20241202-211651.tar.gz": "c13afc513257839762e423af9a52c3c9248657142ef25db0aad63e1a1a2a4ec9",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libkrb5_foreign.linux.20241202-211651.tar.gz": "06a6c93b677e79169ccf7532beabdeb863d0f57bb3db41796a75dbe47ff3bceb",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libkrb5_foreign.linuxarm.20241202-211651.tar.gz": "57dcd4f9d7ffdd5a03127aa7aa2c11a061b7ab457f0c4f717c65914c1aa8cb7d",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libproj_foreign.linux.20241202-211651.tar.gz": "6347a75c1e96e37466ad9442aeafc4f3df8aa56a1afcd006935735d4b62ef3c1",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libproj_foreign.linuxarm.20241202-211651.tar.gz": "129b381500e41126e0fcd0d169df8ec0625e2e6df13d5d10ee81f45312f6af74",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libproj_foreign.macos.20241202-211651.tar.gz": "b0a672f24748c24c941884c04413fd8e20afd6bca95e0451f3cfb15dd2cc1eb9",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libproj_foreign.macosarm.20241202-211651.tar.gz": "a35706bf0112e9652d6e41501113ee0f0f392b67e495979c867f71f17cf6ce7e",
"https://storage.googleapis.com/public-bazel-artifacts/c-deps/20241202-211651/libproj_foreign.windows.20241202-211651.tar.gz": "a33b64a784e856dbb3c84a52075227c48f0ff52a858639c3737a8911201d0c65",
"https://storage.googleapis.com/public-bazel-artifacts/go/20241105-184020/go1.22.8.darwin-amd64.tar.gz": "5d1013d773f76c3cdc974b9afc20033595a2a334774e453be725e7c058e370be",
"https://storage.googleapis.com/public-bazel-artifacts/go/20241105-184020/go1.22.8.darwin-arm64.tar.gz": "304a9d6bfcc5999d47b06f44f79c650173e078251a7adcdb46ba908b22bc4209",
"https://storage.googleapis.com/public-bazel-artifacts/go/20241105-184020/go1.22.8.linux-amd64.tar.gz": "ccc2e994241e6677a07e36aea2b1b3ca942fda2aafeedea6ada47e0e9f566f7b",
Expand Down
32 changes: 16 additions & 16 deletions c-deps/REPOSITORIES.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,80 +39,80 @@ def c_deps():
archived_cdep_repository(
lib = "libgeos",
config = "linux",
sha256 = "3c5ffe12ea3e1b92f80f98e509c206b66a780b175c9aba2b085f1c39377c982f",
sha256 = "ae787cc08fdf6b511859c5c67e5b834a9f6cdb57aa49d32f9226a984bbeb2af5",
)
archived_cdep_repository(
lib = "libjemalloc",
config = "linux",
sha256 = "282967fa0b7ab2d134da7485239ea0e816b4c2b0ca2b59a7fcd30f6d7d0fce3c",
sha256 = "21059f2c065b35fa7cd39a19f882e03dbab24480d0eb787d03dd458bbba92b4a",
)
archived_cdep_repository(
lib = "libkrb5",
config = "linux",
sha256 = "5e392cd33a5c16ed8f618a21f311cee0518fbfa2fbc7800c819cb0d0aacf833b",
sha256 = "06a6c93b677e79169ccf7532beabdeb863d0f57bb3db41796a75dbe47ff3bceb",
)
archived_cdep_repository(
lib = "libproj",
config = "linux",
sha256 = "94f62ceaad3ca235ff932b2256b314a21a62774efc3e0d898c05f5d1d74b7578",
sha256 = "6347a75c1e96e37466ad9442aeafc4f3df8aa56a1afcd006935735d4b62ef3c1",
)
archived_cdep_repository(
lib = "libgeos",
config = "linuxarm",
sha256 = "820b804268e8f69a9f5592d03a5834bb202939184c623f6aca8a00863c4755fd",
sha256 = "edaac8486c7da5a87c3857e52223a35e3533286786c0109847de1fd142884c2a",
)
archived_cdep_repository(
lib = "libjemalloc",
config = "linuxarm",
sha256 = "2eb8217364c5592ea8061ee1aef7406c034cc43a543fb7871fd28c59b5765a5c",
sha256 = "745930cc073b09f5a25690e7b3a273a96dd6943402ba425ad916c9555a2a016c",
)
archived_cdep_repository(
lib = "libkrb5",
config = "linuxarm",
sha256 = "6796b65289835622ee1b634a47cc784c5b764ca63959d77ccc54c66c5afd708d",
sha256 = "57dcd4f9d7ffdd5a03127aa7aa2c11a061b7ab457f0c4f717c65914c1aa8cb7d",
)
archived_cdep_repository(
lib = "libproj",
config = "linuxarm",
sha256 = "06eedc730402719f444349935ca3db928e510cfd95f3aa32eafbc3fdcc10c5b2",
sha256 = "129b381500e41126e0fcd0d169df8ec0625e2e6df13d5d10ee81f45312f6af74",
)
archived_cdep_repository(
lib = "libgeos",
config = "macos",
sha256 = "ad84331c25abae7bec02e54556e38804d5eab1f14c542a369660b040ca25ee14",
sha256 = "2b762d57dd877e54fee402afbdebe433bbd4ee636accf782ec44633c6f1e380b",
)
archived_cdep_repository(
lib = "libjemalloc",
config = "macos",
sha256 = "180dbd0156b89079fedacc9f2d8f0fb3082616ee21ffc1a3f6d1a99a67dfc56d",
sha256 = "255632b4fddebd7cb4799f255251a8137256e207a402900ca7de7be496a1a238",
)
archived_cdep_repository(
lib = "libproj",
config = "macos",
sha256 = "4b4dadf30e225693723612ede7fc5138eb1ad1b863db744c52099535dbdc3c00",
sha256 = "b0a672f24748c24c941884c04413fd8e20afd6bca95e0451f3cfb15dd2cc1eb9",
)
archived_cdep_repository(
lib = "libgeos",
config = "macosarm",
sha256 = "9ec86dcf655cb441a3dbed29897b27b2fbc37830816d07f1da58e197c332a3bb",
sha256 = "401252bba664cbbd9d9329fc068b04b0cc01e390e7c7f419a6cba081c6e950c2",
)
archived_cdep_repository(
lib = "libjemalloc",
config = "macosarm",
sha256 = "9a3fae2482dd837842e755a10b70d7a15b3ff9f431b81e63efc2f20a1885d174",
sha256 = "0a73f3f88183ce7aacb8a105077b32ff6ee77216adc776683cf64f75eb9a6513",
)
archived_cdep_repository(
lib = "libproj",
config = "macosarm",
sha256 = "3e3220bd83009de29185772be26022ae219cb006eae1d8dba87292206ce9f4ea",
sha256 = "a35706bf0112e9652d6e41501113ee0f0f392b67e495979c867f71f17cf6ce7e",
)
archived_cdep_repository(
lib = "libjemalloc",
config = "windows",
sha256 = "4197f25032d45b6e8acb6446914f6153c0fc48e0d75d2eba99d58806622fcc98",
sha256 = "c13afc513257839762e423af9a52c3c9248657142ef25db0aad63e1a1a2a4ec9",
)
archived_cdep_repository(
lib = "libproj",
config = "windows",
sha256 = "8284b57f832ab3c5353860ad715e8844c93bf6822b01cb5108b5b494ea90a2dc",
sha256 = "a33b64a784e856dbb3c84a52075227c48f0ff52a858639c3737a8911201d0c65",
)
2 changes: 1 addition & 1 deletion c-deps/archived.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain")

# NB: URL_TMPL and LOC are used by generate-distdir. Don't change the format or
# name of these definitions unless you update generate-distdir accordingly.
LOC = "20240419-195217"
LOC = "20241202-211651"
URL_TMPL = "https://storage.googleapis.com/public-bazel-artifacts/c-deps/{loc}/{lib}_foreign.{config}.{loc}.tar.gz"

# NB: When we link with the krb5 libraries, we want the linker to see them in
Expand Down
2 changes: 1 addition & 1 deletion c-deps/krb5
Submodule krb5 updated 1230 files
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.19.0
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b
github.com/cockroachdb/pebble v0.0.0-20241125211801-f5057c948b65
github.com/cockroachdb/pebble v0.0.0-20241128154944-1724e81ecbc4
github.com/cockroachdb/redact v1.1.5
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZe
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA=
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA=
github.com/cockroachdb/pebble v0.0.0-20241125211801-f5057c948b65 h1:2VudmJhWr1ImDN3pn718b2NvYwfJtSm20ArBVz4YGyg=
github.com/cockroachdb/pebble v0.0.0-20241125211801-f5057c948b65/go.mod h1:wHj0OgGL0nFHFvlAnluKoJIF+bg5meM676MxW1G6GXg=
github.com/cockroachdb/pebble v0.0.0-20241128154944-1724e81ecbc4 h1:hvttYQN0PR0vp6mjtCQg+GKMmOpn/nBRlgaH+uYnEnY=
github.com/cockroachdb/pebble v0.0.0-20241128154944-1724e81ecbc4/go.mod h1:wHj0OgGL0nFHFvlAnluKoJIF+bg5meM676MxW1G6GXg=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
Expand Down
12 changes: 6 additions & 6 deletions pkg/kv/kvclient/kvcoord/dist_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/startup"
"github.com/cockroachdb/cockroach/pkg/util/stop"
"github.com/cockroachdb/cockroach/pkg/util/syncutil"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/cockroach/pkg/util/tracing"
"github.com/cockroachdb/crlib/crtime"
"github.com/cockroachdb/errors"
Expand Down Expand Up @@ -2145,7 +2144,8 @@ func (ds *DistSender) sendPartialBatch(
// Start a retry loop for sending the batch to the range. Each iteration of
// this loop uses a new descriptor. Attempts to send to multiple replicas in
// this descriptor are done at a lower level.
tBegin, attempts := timeutil.Now(), int64(0) // for slow log message
tBegin := crtime.NowMono() // for slow log message
var attempts int64
// prevTok maintains the EvictionToken used on the previous iteration.
var prevTok rangecache.EvictionToken
for r := retry.StartWithCtx(ctx, ds.rpcRetryOptions); r.Next(); {
Expand Down Expand Up @@ -2202,7 +2202,7 @@ func (ds *DistSender) sendPartialBatch(
prevTok = routingTok
reply, err = ds.sendToReplicas(ctx, ba, routingTok, withCommit)

if dur := timeutil.Since(tBegin); dur > slowDistSenderRangeThreshold && !tBegin.IsZero() {
if dur := tBegin.Elapsed(); dur > slowDistSenderRangeThreshold && tBegin != 0 {
{
var s redact.StringBuilder
slowRangeRPCWarningStr(&s, ba, dur, attempts, routingTok.Desc(), err, reply)
Expand All @@ -2212,14 +2212,14 @@ func (ds *DistSender) sendPartialBatch(
// RPC is not retried any more.
if err != nil || reply.Error != nil {
ds.metrics.SlowRPCs.Inc(1)
defer func(tBegin time.Time, attempts int64) {
defer func(tBegin crtime.Mono, attempts int64) {
ds.metrics.SlowRPCs.Dec(1)
var s redact.StringBuilder
slowRangeRPCReturnWarningStr(&s, timeutil.Since(tBegin), attempts)
slowRangeRPCReturnWarningStr(&s, tBegin.Elapsed(), attempts)
log.Warningf(ctx, "slow RPC response: %v", &s)
}(tBegin, attempts)
}
tBegin = time.Time{} // prevent reentering branch for this RPC
tBegin = 0 // prevent reentering branch for this RPC
}

if err != nil {
Expand Down

0 comments on commit 9e20aab

Please sign in to comment.