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

sqlbase: avoid decode/encode in Fingerprint #47728

Merged
merged 2 commits into from
Apr 21, 2020

Conversation

jordanlewis
Copy link
Member

The Fingerprint method introduced in
b08d8f4 added an unnecessary
decode/encode cycle that didn't exist before, if the input Datum was
already in ASCENDING_KEY encoding.

This commit restores the original behavior.

We should probably backport this to release-20.1.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jordanlewis
Copy link
Member Author

I noticed this while taking a look at one of the heap profiles from the tpcc check OOM that @yuzefovich has been fighting:

image

Copy link
Member

@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.

Huh, I thought those allocations were expected 🤷‍♂️

Nice catch! :lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rohany)

@rohany
Copy link
Contributor

rohany commented Apr 20, 2020

Wow, nice catch! Can you stick a short comment about why we don't call ensure decoded at the top of the method? Maybe this will help the alterpk roachtest!

@yuzefovich
Copy link
Member

Could you add a separate commit here to unskip alterpk-tpcc-500 which I added a skip for today?

The Fingerprint method introduced in
b08d8f4 added an unnecessary
decode/encode cycle that didn't exist before, if the input Datum was
already in ASCENDING_KEY encoding.

This commit restores the original behavior.

We should probably backport this to release-20.1.

Release note: None
@jordanlewis
Copy link
Member Author

TFTRs, both done.

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 21, 2020

Build succeeded

@craig craig bot merged commit 5ad50d8 into cockroachdb:master Apr 21, 2020
@jordanlewis jordanlewis deleted the avoid-decode branch May 1, 2020 01:21
@yuzefovich
Copy link
Member

We should backport this to 20.1.

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