Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
116332: go.mod: bump Pebble to e0f2ccd5c5bc r=nicktrav a=nicktrav

```
e0f2ccd5 metamorphic: increase probability of non-move multilevel compactions
5fab149e db: add multilevel compaction heuristic to OPTIONS file
556b4e0e sstable: update fixtures to TableFormatPebblev1
d5edae67 sstable: replace make-table.cc
cc3088ce sstable: refactor test fixtures
e1a5bbb0 sstable: remove h.ldb
da33ae17 metamorphic: Disable virtual sstables for TestMeta.
0a72dbac Revert "Revert "metamorphic: don't no-op if only range keys are being replicated""
3d309dfc Revert "Revert "metamorphic: generate IngestAndExcise op on prefix keys""
635ec1b2 Revert "Revert "metamorphic: add IngestAndExcise, make EFOS determinitic""
d775d162 metamorphic: copy shared storage contents when saving data
e6e58e8e tool: update corrupted.sst
cb9640d1 tool: update find-mixed sst
1619a6ab tool: regenerate testdata/mixed
a286f0f5 tool: regenerate find-db
b048054b tool: regenerate out-of-order.sst
```

Release note: None.

Epic: None.

116354: sql/catalog: remove egregious allocation r=fqazi a=ajwerner

We were shoving a struct into an interface that only had one implementation -- not even testing was using it. I happened to be looking at a cockroach profile for other reasons and I noticed this. There's some other low hanging fruit, but none as low as this.

```
name                  old time/op    new time/op    delta
KV/Scan/SQL/rows=1-3     179µs ± 6%     178µs ± 9%    ~     (p=0.518 n=25+30)

name                  old alloc/op   new alloc/op   delta
KV/Scan/SQL/rows=1-3    30.9kB ± 2%    30.7kB ± 1%  -0.40%  (p=0.028 n=28+29)

name                  old allocs/op  new allocs/op  delta
KV/Scan/SQL/rows=1-3       357 ± 3%       351 ± 2%  -1.78%  (p=0.000 n=30+27)
```

Epic: none

Release note: None

Co-authored-by: Nick Travers <[email protected]>
Co-authored-by: Andrew Werner <[email protected]>
  • Loading branch information
3 people committed Dec 13, 2023
3 parents 8dccf1f + b902799 + f250900 commit 366b81d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 24 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1613,10 +1613,10 @@ def go_deps():
patches = [
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
],
sha256 = "936fad6922f386f5ade458fa862f4b3301d68dc8f81e63f08ac400c99f7c5bc1",
strip_prefix = "github.com/cockroachdb/[email protected]20231211223132-9848bcdb0fe9",
sha256 = "0a5676d2dddeb3e1a3cfe0467fa58471aaf3ff97b59588d8b8b12a3e125594f4",
strip_prefix = "github.com/cockroachdb/[email protected]20231213142202-e0f2ccd5c5bc",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20231211223132-9848bcdb0fe9.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20231213142202-e0f2ccd5c5bc.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 @@ -322,7 +322,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-20231211223132-9848bcdb0fe9.zip": "936fad6922f386f5ade458fa862f4b3301d68dc8f81e63f08ac400c99f7c5bc1",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20231213142202-e0f2ccd5c5bc.zip": "0a5676d2dddeb3e1a3cfe0467fa58471aaf3ff97b59588d8b8b12a3e125594f4",
"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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,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-20231211223132-9848bcdb0fe9
github.com/cockroachdb/pebble v0.0.0-20231213142202-e0f2ccd5c5bc
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 @@ -493,8 +493,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-20231211223132-9848bcdb0fe9 h1:f3eH58jJkWd70J3E6BNQPNjMEorA9l72dLBJCoX/UEc=
github.com/cockroachdb/pebble v0.0.0-20231211223132-9848bcdb0fe9/go.mod h1:BHuaMa/lK7fUe75BlsteiiTu8ptIG+qSAuDtGMArP18=
github.com/cockroachdb/pebble v0.0.0-20231213142202-e0f2ccd5c5bc h1:9aUtYIPi6RtOI4KMlswPYHAVMrKlXC/3XbfWdhmkbYw=
github.com/cockroachdb/pebble v0.0.0-20231213142202-e0f2ccd5c5bc/go.mod h1:BHuaMa/lK7fUe75BlsteiiTu8ptIG+qSAuDtGMArP18=
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
26 changes: 9 additions & 17 deletions pkg/sql/catalog/descs/getters.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,34 +402,26 @@ func (g MutableByNameGetter) Type(

func makeGetterBase(txn *kv.Txn, col *Collection, flags getterFlags) getterBase {
return getterBase{
txn: &txnWrapper{Txn: txn, Collection: col},
flags: flags,
txnWrapper: txnWrapper{Txn: txn, Collection: col},
flags: flags,
}
}

type getterBase struct {
txn
txnWrapper
flags getterFlags
}

type (
txn interface {
KV() *kv.Txn
Descriptors() *Collection
}
txnWrapper struct {
*kv.Txn
*Collection
}
)

var _ txn = &txnWrapper{}
type txnWrapper struct {
*kv.Txn
*Collection
}

func (w *txnWrapper) KV() *kv.Txn {
func (w txnWrapper) KV() *kv.Txn {
return w.Txn
}

func (w *txnWrapper) Descriptors() *Collection {
func (w txnWrapper) Descriptors() *Collection {
return w.Collection
}

Expand Down

0 comments on commit 366b81d

Please sign in to comment.