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

sql: de-flake TestRecordBatchSerializerDeserializeMemoryEstimate #75583

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

cucaroach
Copy link
Contributor

@cucaroach cucaroach commented Jan 26, 2022

Fixes: #73781

When BatchSize was low and each buffer was much smaller than capacity
we could end up with newMemorySize more than %33 smaller than original.
However the test is just making sure we aren't double counting memory
so testing that newMemorySize - originalMemory < 4/3 original. I.e.
its okay if it shrinks but we don't want it to be more than %33 bigger.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Fixes: cockroachdb#73781

When BatchSize was low and each buffer was much smaller than capacity
we could end up with newMemorySize more than %33 smaller than original.
However the test is just making sure we aren't double counting memory
so testing that newMemorySize - originalMemory < 4/3 original.  I.e.
its okay if it shrinks but we don't want it to be more than %33 bigger.

Release note: None
@cucaroach cucaroach changed the title gh73781 sql: de-flake TestRecordBatchSerializerDeserializeMemoryEstimate Jan 26, 2022
@cucaroach cucaroach marked this pull request as ready for review January 27, 2022 02:34
@cucaroach cucaroach requested a review from a team as a code owner January 27, 2022 02:34
@cucaroach cucaroach requested a review from yuzefovich January 27, 2022 02:34
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.

:lgtm: Thanks!

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)


pkg/col/colserde/record_batch_test.go, line 344 at r1 (raw file):

	// We expect that the original and the new memory sizes are relatively close
	// to each other, specifically newMemorySize must less than

nit: s/must less/must be less/.

@cucaroach
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 27, 2022

Build succeeded:

@craig craig bot merged commit 659fe19 into cockroachdb:master Jan 27, 2022
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.

col/colserde: TestRecordBatchSerializerDeserializeMemoryEstimate failed
3 participants