Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…db#72304 cockroachdb#72519 cockroachdb#72522

57010: sql: pool SpanBuilders r=yuzefovich a=jordanlewis

The SpanBuilder is an object that is allocated at least once per query, along
with slice memory inside of it, making it a good candidate for object
pooling.

```
name                                           old time/op    new time/op    delta
FlowSetup/vectorize=true/distribute=true-24       232µs ± 3%     232µs ± 2%    ~     (p=1.000 n=9+10)
FlowSetup/vectorize=true/distribute=false-24      222µs ± 2%     224µs ± 6%    ~     (p=0.315 n=10+10)
FlowSetup/vectorize=false/distribute=true-24      218µs ± 5%     219µs ± 4%    ~     (p=0.529 n=10+10)
FlowSetup/vectorize=false/distribute=false-24     209µs ± 3%     213µs ± 5%    ~     (p=0.123 n=10+10)

name                                           old alloc/op   new alloc/op   delta
FlowSetup/vectorize=true/distribute=true-24      38.1kB ± 3%    37.0kB ± 1%  -2.91%  (p=0.000 n=9+9)
FlowSetup/vectorize=true/distribute=false-24     36.0kB ± 0%    35.5kB ± 4%  -1.47%  (p=0.034 n=8+10)
FlowSetup/vectorize=false/distribute=true-24     42.8kB ± 0%    41.9kB ± 0%  -2.09%  (p=0.000 n=8+9)
FlowSetup/vectorize=false/distribute=false-24    41.1kB ± 0%    40.1kB ± 0%  -2.39%  (p=0.000 n=9+9)

name                                           old allocs/op  new allocs/op  delta
FlowSetup/vectorize=true/distribute=true-24         358 ± 1%       354 ± 0%  -1.14%  (p=0.000 n=9+8)
FlowSetup/vectorize=true/distribute=false-24        343 ± 0%       340 ± 0%  -0.87%  (p=0.000 n=9+8)
FlowSetup/vectorize=false/distribute=true-24        336 ± 0%       333 ± 0%  -0.89%  (p=0.000 n=9+9)
FlowSetup/vectorize=false/distribute=false-24       322 ± 0%       319 ± 0%  -0.93%  (p=0.001 n=8+9)
```

Release note: None

71873: sql: match postgres for casting 0 to regtype/regproc/regnamespace/regtype r=rafiss a=lpessoa

Fixes cockroachdb#67715 
 
Postgres outputs `-` for calls to
- `select 0::oid::regproc;`
- `select 0::oid::regprocedure;`
- `select 0::oid::regnamespace;`
- `select 0::oid::regclass;`
- `select 0::oid::regtype;`

CockroachDB outputs `0` instead.

In order to be compliant to Postgres behavior we need to change Cockroach to provide the same output for the above mentioned
scenarios.

For this we changed Datum to Format `DInts` as `-` for the special `0` scenario.
Additional tests where added to `cast` testdata and also a new `FakeEventPlanner`struct class was implemented to support the new test scenarios thus avoiding nil pointer exceptions during tests.

Release note: None

72276: server: actually ensure clock monotonicity on startup r=nvanbenschoten a=nvanbenschoten

This was accidentally broken by c7811bc. We want to call this function even when the persisted HLC upper bound (which is not set by default) is missing.

72304: bazel: add `pkg/cmd/mirror` r=rail a=rickystewart

This tool will be extended with functionality to mirror Go module ZIP's
to cloud storage. For now, the mirroring functionality is missing, so
we just generate the `DEPS.bzl` content in much the same way as
`gazelle update-repos` does. (This doesn't change the content of
`DEPS.bzl` in any way besides alphabetizing the contents.)

Release note: None

72519: bazel: allow setting `--action_env` in `rules_foreign_cc` rules r=rail a=rickystewart

Pull in commit `f1cff4544cd7a86f9de44cd79f50d151eb7cc781` of
`rules_foreign_cc` (cockroachdb/rules_foreign_cc@f1cff45)
to allow setting `--action_env` for `rules_foreign_cc` rules. This is
necessary for M1 Macs.

Closes cockroachdb#72398.

Release note: None

72522: bazel: upgrade to `bazel` 4.1.0 r=rail a=rickystewart

This is the first Bazel version to have an official release for macOS on
ARM.

Release note: None

Co-authored-by: Jordan Lewis <[email protected]>
Co-authored-by: lpessoa <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Co-authored-by: Ricky Stewart <[email protected]>
  • Loading branch information
5 people committed Nov 8, 2021
7 parents fdee50b + fe05765 + 77af0ef + 7dd6acc + 4c83d00 + 2df0472 + 8384ef2 commit 32d82ec
Show file tree
Hide file tree
Showing 29 changed files with 515 additions and 291 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.1.0
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
/pkg/cmd/gossipsim/ @cockroachdb/kv-prs
/pkg/cmd/import-tools/ @cockroachdb/dev-inf
/pkg/cmd/internal/issues/ @cockroachdb/test-eng
/pkg/cmd/mirror/ @cockroachdb/dev-inf
/pkg/cmd/prereqs/ @cockroachdb/dev-inf
/pkg/cmd/protoc-gen-gogoroach/ @cockroachdb/server-prs
/pkg/cmd/publish-artifacts/ @cockroachdb/dev-inf
Expand Down
5 changes: 5 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
exports_files([
"go.mod",
"go.sum",
])

load("@bazel_gazelle//:def.bzl", "gazelle")

# The following directives inform gazelle how to auto-generate BUILD.bazel
Expand Down
Loading

0 comments on commit 32d82ec

Please sign in to comment.