Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: don't set {,TxnSpan}GCThreshold to zero-values #18834

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

petermattis
Copy link
Collaborator

Fixes #18831

@petermattis petermattis requested a review from a team September 27, 2017 19:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@petermattis
Copy link
Collaborator Author

This needs a test.

@petermattis
Copy link
Collaborator Author

I'm probably not going to get to a test today. I think we should merge this PR as I'm 99% sure it fixes the problem and I'll follow up with a test tomorrow or Friday.

@petermattis petermattis merged commit 4a23ce1 into cockroachdb:master Sep 27, 2017
@petermattis petermattis deleted the pmattis/gc-threshold branch September 27, 2017 21:53
tbg added a commit to tbg/cockroach that referenced this pull request Oct 2, 2017
Changing the nullability of proto fields is tricky. PRs cockroachdb#18825 introduced (at least) two (cockroachdb#18835 and
\cockroachdb#18834) bugs that we found relatively quickly, but not in CI.

In the spirit of advancing cockroachdb#18811, here's an attempt at making our CI provoke these types of errors
more aggressively.

Basically, establish a struct tag `cockroachdb:"randnullable"` that instructs `protoutil.Marshal` to
randomly turn `nil` fields into pointers to the zero value. This is allocation heavy (due to the
need to avoid data races), so it is disabled with the `bench` build tag.

We can then annotate fields whose nullability we change and get more coverage of the implications
of that change.

I was able to reproduce both cockroachdb#18835 (with `TestStoreRangeLease` going into an infinite loop) and
\cockroachdb#18834 (with a lot of assertion crashes).

@petermattis I'm probably missing a few fields. Care to point out which ones should also be fuzzed?
tbg added a commit to tbg/cockroach that referenced this pull request Oct 2, 2017
Changing the nullability of proto fields is tricky. PRs cockroachdb#18825 introduced (at least) two (cockroachdb#18835 and
\cockroachdb#18834) bugs that we found relatively quickly, but not in CI.

In the spirit of advancing cockroachdb#18811, here's an attempt at making our CI provoke these types of errors
more aggressively.

Basically, establish a struct tag `cockroachdb:"randnullable"` that instructs `protoutil.Marshal` to
randomly turn `nil` fields into pointers to the zero value. This is allocation heavy (due to the
need to avoid data races), so it is disabled outside of race builds.

We can then annotate fields whose nullability we change and get more coverage of the implications
of that change.

I was able to reproduce both cockroachdb#18835 (with `TestStoreRangeLease` going into an infinite loop) and
\cockroachdb#18834 (with a lot of assertion crashes).

@petermattis I'm probably missing a few fields. Care to point out which ones should also be fuzzed?
tbg added a commit to tbg/cockroach that referenced this pull request Oct 2, 2017
Changing the nullability of proto fields is tricky. PRs cockroachdb#18825 introduced (at least) two (cockroachdb#18835 and
\cockroachdb#18834) bugs that we found relatively quickly, but not in CI.

In the spirit of advancing cockroachdb#18811, here's an attempt at making our CI provoke these types of errors
more aggressively.

Basically, establish a struct tag `cockroachdb:"randnullable"` that instructs `protoutil.Marshal` to
randomly turn `nil` fields into pointers to the zero value. This is allocation heavy (due to the
need to avoid data races), so it is disabled outside of race builds.

We can then annotate fields whose nullability we change and get more coverage of the implications
of that change.

I was able to reproduce both cockroachdb#18835 (with `TestStoreRangeLease` going into an infinite loop) and
\cockroachdb#18834 (with a lot of assertion crashes).

@petermattis I'm probably missing a few fields. Care to point out which ones should also be fuzzed?
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.

3 participants