Skip to content

kv/kvserver: disable the below-raft proto tracking in race builds#50239

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
petermattis:pmattis/below-raft-proto-tracking
Jun 15, 2020
Merged

kv/kvserver: disable the below-raft proto tracking in race builds#50239
craig[bot] merged 1 commit intocockroachdb:masterfrom
petermattis:pmattis/below-raft-proto-tracking

Conversation

@petermattis
Copy link
Copy Markdown
Collaborator

The below-raft proto tracking is meant to catch bugs where we
inadvertently starting marshaling a proto below Raft. This tracking is a
source of signficant memory allocations which measurably slow down race
builds. Since we're already doing this tracking in non-race builds,
there is little benefit to also doing it in race builds. Disabling
below-raft proto tracking for race builds reduces the time to run
testrace on the kv/kvserver package from 605s to 517s on my laptop.

Release note: None

The below-raft proto tracking is meant to catch bugs where we
inadvertently starting marshaling a proto below Raft. This tracking is a
source of signficant memory allocations which measurably slow down race
builds. Since we're already doing this tracking in non-race builds,
there is little benefit to also doing it in race builds. Disabling
below-raft proto tracking for race builds reduces the time to run
`testrace` on the `kv/kvserver` package from 605s to 517s on my laptop.

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

But please see if also removing this from testshort would help.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @bdarnell)

@petermattis
Copy link
Copy Markdown
Collaborator Author

But please see if also removing this from testshort would help.

The effect is much more muted: 125s -> 118s. There is also a practical difficulty in doing this as testing.Short() cannot be called before flags are parsed, but I'd need to do this from TestMain before flags are parsed. The 125s->118s timing is the potential benefit. Actually achieving it would require more elbow grease.

TFTR!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jun 15, 2020

Build succeeded

@craig craig bot merged commit 5cff000 into cockroachdb:master Jun 15, 2020
@petermattis petermattis deleted the pmattis/below-raft-proto-tracking branch June 16, 2020 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants