Skip to content

Commit

Permalink
Merge #90791
Browse files Browse the repository at this point in the history
90791: vendor: bump Pebble to 4dc277f9d3a9 r=itsbilal a=jbowens

```
4dc277f9 crossversion: use op-count distribution with low lower bound
e1da16a7 *: Fix race in compactMarkedFilesLocked with concurrent compactions
dd12a228 vfs: default to Unix semantics in MemFS
caa5fcde db: adaptive size-based rollover logic for manifest
e3a60a87 sstable: fix twoLevelIterator SeekGE optimization
181258e4 db: integrate elastic cpu granter with pebble
f34af25a .github: renable crossversion metamorphic CI action
```

Epic: None
Release note: None

Co-authored-by: Jackson Owens <[email protected]>
  • Loading branch information
craig[bot] and jbowens committed Oct 28, 2022
2 parents 8cdaa31 + 272557e commit 421aff1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1425,10 +1425,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "00dc39960eaf7ab83cf537a281ee1b8663649fa3f00655a9ad64903a3f0a50dd",
strip_prefix = "github.com/cockroachdb/[email protected]20221021134840-b481a1e2714a",
sha256 = "6180ad8b03804b65368e304edad0997cea814a658c52f51260503e71e6d60053",
strip_prefix = "github.com/cockroachdb/[email protected]20221027190118-4dc277f9d3a9",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221021134840-b481a1e2714a.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221027190118-4dc277f9d3a9.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,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.13.0.zip": "b3d43d8f95edf65f73a5348f29e1159823cac64b148f8d3bb48340bf55d70872",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20211118104740-dabe8e521a4f.zip": "1972c3f171f118add3fd9e64bcea6cbb9959a3b7fa0ada308e8a7310813fea74",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221021134840-b481a1e2714a.zip": "00dc39960eaf7ab83cf537a281ee1b8663649fa3f00655a9ad64903a3f0a50dd",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20221027190118-4dc277f9d3a9.zip": "6180ad8b03804b65368e304edad0997cea814a658c52f51260503e71e6d60053",
"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",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
github.com/cockroachdb/go-test-teamcity v0.0.0-20191211140407-cff980ad0a55
github.com/cockroachdb/gostdlib v1.13.0
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f
github.com/cockroachdb/pebble v0.0.0-20221021134840-b481a1e2714a
github.com/cockroachdb/pebble v0.0.0-20221027190118-4dc277f9d3a9
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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ github.com/cockroachdb/gostdlib v1.13.0/go.mod h1:eXX95p9QDrYwJfJ6AgeN9QnRa/lqqi
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v0.0.0-20221021134840-b481a1e2714a h1:U+9T/g+kU2uwd1Gx+eUbnGfuDjev8KGfIs8fkU2Ezig=
github.com/cockroachdb/pebble v0.0.0-20221021134840-b481a1e2714a/go.mod h1:qf9bLis2yy1XyNYD01wvIHPabuC1STzQsvGibYVsom4=
github.com/cockroachdb/pebble v0.0.0-20221027190118-4dc277f9d3a9 h1:v7fxmHp4s2S9RF+KgFamF1cjztbA0ze2wXpW1KydEBQ=
github.com/cockroachdb/pebble v0.0.0-20221027190118-4dc277f9d3a9/go.mod h1:qf9bLis2yy1XyNYD01wvIHPabuC1STzQsvGibYVsom4=
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=
Expand Down
26 changes: 14 additions & 12 deletions pkg/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,16 +562,16 @@ func (e *Engines) Close() {

// cpuWorkPermissionGranter implements the pebble.CPUWorkPermissionGranter
// interface.
type cpuWorkPermissionGranter struct {
*admission.SoftSlotGranter
}
//type cpuWorkPermissionGranter struct {
//*admission.SoftSlotGranter
//}

func (c *cpuWorkPermissionGranter) TryGetProcs(count int) int {
return c.TryGetSlots(count)
}
func (c *cpuWorkPermissionGranter) ReturnProcs(count int) {
c.ReturnSlots(count)
}
//func (c *cpuWorkPermissionGranter) TryGetProcs(count int) int {
//return c.TryGetSlots(count)
//}
//func (c *cpuWorkPermissionGranter) ReturnProcs(count int) {
//c.ReturnSlots(count)
//}

// CreateEngines creates Engines based on the specs in cfg.Stores.
func (cfg *Config) CreateEngines(ctx context.Context) (Engines, error) {
Expand Down Expand Up @@ -697,9 +697,11 @@ func (cfg *Config) CreateEngines(ctx context.Context) (Engines, error) {
pebbleConfig.Opts.TableCache = tableCache
pebbleConfig.Opts.MaxOpenFiles = int(openFileLimitPerStore)
pebbleConfig.Opts.Experimental.MaxWriterConcurrency = 2
pebbleConfig.Opts.Experimental.CPUWorkPermissionGranter = &cpuWorkPermissionGranter{
cfg.SoftSlotGranter,
}
// TODO(jackson): Implement the new pebble.CPUWorkPermissionGranter
// interface.
//pebbleConfig.Opts.Experimental.CPUWorkPermissionGranter = &cpuWorkPermissionGranter{
//cfg.SoftSlotGranter,
//}
if storeKnobs.SmallEngineBlocks {
for i := range pebbleConfig.Opts.Levels {
pebbleConfig.Opts.Levels[i].BlockSize = 1
Expand Down

0 comments on commit 421aff1

Please sign in to comment.