From 71bbed7bc9f1a1d35b777edc1dead9422a71e979 Mon Sep 17 00:00:00 2001 From: Radu Berinde Date: Wed, 5 Apr 2023 11:05:06 -0700 Subject: [PATCH] go.mod: bump Pebble to 16bf77ee4012 16bf77ee shared: add IsNotExistError method to shared.Storage 93eff0a7 manifest: remove struct Atomic from FileBacking 6bf568d8 manifest: use atomic types in FileMetadata 67895e1d manifest: don't copy FileMetadata by value 7d5a3b7c db: use atomic types in Db a664f69f replay: use atomic types 9de87a35 vfs: use atomic.Uint32 for disk full generation 75b78212 pebble: use atomic.Int32 for memTable.writerRefs 44af3316 cmd/pebble: use atomic types 5e9ccb46 pebble: use atomic type in commitQueue 41fce88e *: use atomic types in tests e0a52f16 pebble: add TODO for FilterMetrics 18af1e35 pebble: use atomic types in table cache 49137e40 pebble: use atomic.Uint64 for sequence numbers e808d80d pebble: use atomic.Int32 for iterCount in tableCacheOpts 37f6c795 pebble: use atomic.Bool for Batch.applied c865bc3c pebble: use atomic.Int64 for TableCache refs Release note: none Epic: none --- DEPS.bzl | 6 +++--- build/bazelutil/distdir_files.bzl | 2 +- go.mod | 2 +- go.sum | 4 ++-- pkg/storage/shared_storage.go | 5 +++++ 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/DEPS.bzl b/DEPS.bzl index c5889f733723..604d3caa44b2 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 = "f282ddeea7d1c18f2acc37c252e6673b6d11c046a1c78bb28106bd7b8feea319", - strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20230403163348-b84a7ec7d8dc", + sha256 = "4ba6205e0829b82c4c0ece96e38c7be860684ae0dab725d745b0d5fd62fd93c8", + strip_prefix = "github.com/cockroachdb/pebble@v0.0.0-20230405180252-16bf77ee4012", urls = [ - "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230403163348-b84a7ec7d8dc.zip", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230405180252-16bf77ee4012.zip", ], ) go_repository( diff --git a/build/bazelutil/distdir_files.bzl b/build/bazelutil/distdir_files.bzl index 7a6989ad0f2f..fd00b90f863e 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-20230403163348-b84a7ec7d8dc.zip": "f282ddeea7d1c18f2acc37c252e6673b6d11c046a1c78bb28106bd7b8feea319", + "https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20230405180252-16bf77ee4012.zip": "4ba6205e0829b82c4c0ece96e38c7be860684ae0dab725d745b0d5fd62fd93c8", "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 a4b3e0035f63..ae8b40e61501 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-20230403163348-b84a7ec7d8dc + github.com/cockroachdb/pebble v0.0.0-20230405180252-16bf77ee4012 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 5981e9d10ddb..37fc63434ab3 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-20230403163348-b84a7ec7d8dc h1:JvaHl6Zd/1rLIJ/sJAkEGCsyFRRp5Lh5nMAZzUnftZc= -github.com/cockroachdb/pebble v0.0.0-20230403163348-b84a7ec7d8dc/go.mod h1:9lRMC4XN3/BLPtIp6kAKwIaHu369NOf2rMucPzipz50= +github.com/cockroachdb/pebble v0.0.0-20230405180252-16bf77ee4012 h1:ZHyejsA4M/E+4fcR3OKQytkIK95yvYaqT4yOpJKFhJQ= +github.com/cockroachdb/pebble v0.0.0-20230405180252-16bf77ee4012/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/shared_storage.go b/pkg/storage/shared_storage.go index fc34ca66a468..ae6f25779114 100644 --- a/pkg/storage/shared_storage.go +++ b/pkg/storage/shared_storage.go @@ -17,6 +17,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/cloud" "github.com/cockroachdb/cockroach/pkg/util/ioctx" + "github.com/cockroachdb/errors" "github.com/cockroachdb/pebble/objstorage/shared" ) @@ -122,3 +123,7 @@ func (e *externalStorageWrapper) Delete(basename string) error { func (e *externalStorageWrapper) Size(basename string) (int64, error) { return e.es.Size(e.ctx, basename) } + +func (e *externalStorageWrapper) IsNotExistError(err error) bool { + return errors.Is(err, cloud.ErrFileDoesNotExist) +}