coldata: fix behavior of Vec.Append in some cases when NULLs are present#43720
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jan 15, 2020
Merged
coldata: fix behavior of Vec.Append in some cases when NULLs are present#43720craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
1e8ab9b to
9e9d73c
Compare
9e9d73c to
e79ada6
Compare
asubiotto
reviewed
Jan 13, 2020
Contributor
asubiotto
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @yuzefovich)
pkg/col/coldata/vec_test.go, line 245 at r1 (raw file):
dest.Append(sliceArgs) }) }
We might want to consider adding an equality check at the end.
e79ada6 to
cd29a43
Compare
yuzefovich
commented
Jan 13, 2020
Member
Author
yuzefovich
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @asubiotto)
pkg/col/coldata/vec_test.go, line 245 at r1 (raw file):
Previously, asubiotto (Alfonso Subiotto Marqués) wrote…
We might want to consider adding an equality check at the end.
Done.
cd29a43 to
1132499
Compare
We would always Get and then Set a value while Append'ing without paying attention to whether the value is actually NULL. This can lead to problems in case of flat bytes if the necessary invariant is unmaintained. Now this is fixed by explicitly enforcing the invariant. Additionally, this commit ensures that the destination slice has the desired capacity before appending one value at a time (in case of a present selection vector). I tried approach with paying attention to whether the value is NULL before appending it and saw a significant performance hit, so I think this approach is the least evil. Release note: None
1132499 to
aab7a0f
Compare
asubiotto
approved these changes
Jan 15, 2020
Contributor
asubiotto
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)
Member
Author
|
TFTR! bors r+ |
Contributor
Build failed (retrying...) |
craig bot
pushed a commit
that referenced
this pull request
Jan 15, 2020
43720: coldata: fix behavior of Vec.Append in some cases when NULLs are present r=yuzefovich a=yuzefovich We would always Get and then Set a value while Append'ing without paying attention to whether the value is actually NULL. This can lead to problems in case of flat bytes if the necessary invariant is unmaintained. Now this is fixed by explicitly enforcing the invariant. Additionally, this commit ensures that the destination slice has the desired capacity before appending one value at a time (in case of a present selection vector). I tried approach with paying attention to whether the value is NULL before appending it and saw a significant performance hit, so I think this approach is the least evil. Fixes: #42774. Release note: None 43933: backupccl: ensure restore on success is run once r=pbardea a=pbardea It seems that jobs today do not ensure that the OnSuccess callback is called exactly once. This PR moves the cleanup stages of RESTORE, formerly located in the OnSuccess callback to be the final steps of Resume. This should help ensure that these stages are run once and only once. Release note (bug fix): Ensure that RESTORE cleanup is run exactly once. 44013: roachtest: skip acceptance/version-upgrade because flaky r=andreimatei a=andreimatei Very flaky, apparently because of some problem with a recent migration. Touches #43957, #44005 Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Paul Bardea <pbardea@gmail.com> Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We would always Get and then Set a value while Append'ing without paying
attention to whether the value is actually NULL. This can lead to
problems in case of flat bytes if the necessary invariant is
unmaintained. Now this is fixed by explicitly enforcing the invariant.
Additionally, this commit ensures that the destination slice has the
desired capacity before appending one value at a time (in case of
a present selection vector).
I tried approach with paying attention to whether the value is NULL
before appending it and saw a significant performance hit, so I think
this approach is the least evil.
Fixes: #42774.
Release note: None