diff --git a/DEPS.bzl b/DEPS.bzl index ab686cf60756..4dac742bde14 100644 --- a/DEPS.bzl +++ b/DEPS.bzl @@ -1555,10 +1555,10 @@ def go_deps(): patches = [ "@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch", ], - sha256 = "164a7b270d9f9d1ddfaed4fd5f05ebea9e5631deb5c56494ec90a792fd904866", - strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20230510142723-23f478ba445a", + sha256 = "554fc66c534e02cf6df170089689a1b2b162984a67c67175eae37864e0fe858f", + strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20230515154427-9f426d5cfd97", urls = [ - "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230510142723-23f478ba445a.zip", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230515154427-9f426d5cfd97.zip", ], ) go_repository( diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index de5550ced762..55b01c0130d1 100644 --- a/build/bazelutil/distdir_files.bzl +++ b/build/bazelutil/distdir_files.bzl @@ -311,7 +311,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/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/pebble/com_github_cockroachdb_pebble-v0.0.0-20230510142723-23f478ba445a.zip": "164a7b270d9f9d1ddfaed4fd5f05ebea9e5631deb5c56494ec90a792fd904866", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230515154427-9f426d5cfd97.zip": "554fc66c534e02cf6df170089689a1b2b162984a67c67175eae37864e0fe858f", "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.3.zip": "7778b1e4485e4f17f35e5e592d87eb99c29e173ac9507801d000ad76dd0c261e", "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/sentry-go/com_github_cockroachdb_sentry_go-v0.6.1-cockroachdb.2.zip": "fbb2207d02aecfdd411b1357efe1192dbb827959e36b7cab7491731ac55935c9", diff --git a/go.mod b/go.mod index f22b65c32edd..6f2bb8d33ace 100644 --- a/go.mod +++ b/go.mod @@ -115,7 +115,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-20230510142723-23f478ba445a + github.com/cockroachdb/pebble v0.0.0-20230515154427-9f426d5cfd97 github.com/cockroachdb/redact v1.1.3 github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd github.com/cockroachdb/stress v0.0.0-20220803192808-1806698b1b7b diff --git a/go.sum b/go.sum index c433636504b7..9c96e2ef6b4a 100644 --- a/go.sum +++ b/go.sum @@ -479,8 +479,8 @@ github.com/cockroachdb/gostdlib v1.19.0/go.mod h1:+dqqpARXbE/gRDEhCak6dm0l14AaTy 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= -github.com/cockroachdb/pebble v0.0.0-20230510142723-23f478ba445a h1:0dd45H456Cba5DMPHANiFIr1BUSyY+sP/LNdyzVB3F4= -github.com/cockroachdb/pebble v0.0.0-20230510142723-23f478ba445a/go.mod h1:9lRMC4XN3/BLPtIp6kAKwIaHu369NOf2rMucPzipz50= +github.com/cockroachdb/pebble v0.0.0-20230515154427-9f426d5cfd97 h1:uzrYt+xtDS2hR/TvCeZXbNUDNnCk9vdIJl8ecO2bBFY= +github.com/cockroachdb/pebble v0.0.0-20230515154427-9f426d5cfd97/go.mod h1:9lRMC4XN3/BLPtIp6kAKwIaHu369NOf2rMucPzipz50= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd h1:KFOt5I9nEKZgCnOSmy8r4Oykh8BYQO8bFOTgHDS8YZA= diff --git a/pkg/storage/pebble.go b/pkg/storage/pebble.go index 817a0a973b02..9b03e8c750c1 100644 --- a/pkg/storage/pebble.go +++ b/pkg/storage/pebble.go @@ -664,7 +664,13 @@ func wrapFilesystemMiddleware(opts *pebble.Options) (vfs.FS, io.Closer) { // wraps the filesystem with a layer that times all write-oriented // operations. fs, closer := vfs.WithDiskHealthChecks(opts.FS, diskHealthCheckInterval, - opts.EventListener.DiskSlow) + func(name string, opType vfs.OpType, duration time.Duration) { + opts.EventListener.DiskSlow(pebble.DiskSlowInfo{ + Path: name, + OpType: opType, + Duration: duration, + }) + }) // If we encounter ENOSPC, exit with an informative exit code. fs = vfs.OnDiskFull(fs, func() { exit.WithCode(exit.DiskFull())