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

exec: fix possible infinite loops in the benchmark #37106

Merged
merged 1 commit into from
Apr 29, 2019

Conversation

yuzefovich
Copy link
Member

Release note: None

@yuzefovich yuzefovich requested review from jordanlewis and a team April 25, 2019 00:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

@solongordon I think you were looking at this too?

@yuzefovich it might be easier to always include an element of mintint64 as the 0th element or something?

:lgtm: though.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis)

Copy link
Contributor

@solongordon solongordon left a comment

Choose a reason for hiding this comment

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

My in-progress PR for null handling makes these benchmarks deterministic. No harm in merging this in the meantime.

It might also be nice to add a bit of logic to repeatableBatchSource which panics if Next is called some unrealistically high number of times, since I'm sure we'll hit this problem again.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

I liked Jordan's suggestion on how to simplify the logic a bit by putting a few specific values.

Not sure about the repeatableBatchSource - what that unrealistic number would be? I think that Golang itself panics after reaching the certain depth of the stack, right? And our logic would be very similar - we'd check for number of batches returned and panic with a custom message instead of Golang's.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

Copy link
Contributor

@solongordon solongordon left a comment

Choose a reason for hiding this comment

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

I don't think there's recursion going on so we wouldn't hit a stack depth error. But yeah, don't know off the top of my head what a good number would be. Don't worry about it for this PR, just an idea.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@yuzefovich
Copy link
Member Author

TFTRs!

bors r+

craig bot pushed a commit that referenced this pull request Apr 29, 2019
37106: exec: fix possible infinite loops in the benchmark r=yuzefovich a=yuzefovich

Release note: None

Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Apr 29, 2019

Build succeeded

@craig craig bot merged commit 56906de into cockroachdb:master Apr 29, 2019
@yuzefovich yuzefovich deleted the fix-benchmark branch April 29, 2019 20:49
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