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

coldata: make coldata.BatchSize a package function #40866

Merged
merged 1 commit into from
Sep 20, 2019
Merged

coldata: make coldata.BatchSize a package function #40866

merged 1 commit into from
Sep 20, 2019

Conversation

asubiotto
Copy link
Contributor

This will allow us to vary the batchSize private variable int the future
by providing a testing hook for external packages to modify the batch
size at will.

Release justification: Category 1 non-production code change.

Release note: None

The only "interesting" changes are in coldata/batch.go and colexec/utils_test.go where I made a change to use BatchSize() rather than hardcode batch sizes to use. In passing, I also noticed we test batch sizes of 1, 2, and 3 elements. Do we need to do that? If not, we could remove one of them to reduce test runtime by ~2s.

@asubiotto asubiotto requested review from yuzefovich and a team September 18, 2019 10:17
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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:

I think we should keep sizes of 1, 2, and 3 because our unit test cases often have very few input tuples, so the varying small batch size will test "more cases." I definitely remember seeing some failures on merge joiner on the batch size of 2 or 3 but not on others.

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


pkg/sql/colexec/select_in_tmpl.go, line 30 at r1 (raw file):

	"github.com/cockroachdb/cockroach/pkg/col/coldata"
	"github.com/cockroachdb/cockroach/pkg/col/coltypes"

[nit]: seems like extra new line.

Copy link
Contributor Author

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

bors r=yuzefovich

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


pkg/sql/colexec/select_in_tmpl.go, line 30 at r1 (raw file):

Previously, yuzefovich wrote…

[nit]: seems like extra new line.

Thanks. No idea why goland keeps doing this.

@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build failed

@asubiotto
Copy link
Contributor Author

bors r=yuzefovich

craig bot pushed a commit that referenced this pull request Sep 19, 2019
40866: coldata: make coldata.BatchSize a package function r=yuzefovich a=asubiotto

This will allow us to vary the batchSize private variable int the future
by providing a testing hook for external packages to modify the batch
size at will.

Release justification: Category 1 non-production code change.

Release note: None

The only "interesting" changes are in `coldata/batch.go` and `colexec/utils_test.go` where I made a change to use `BatchSize()` rather than hardcode batch sizes to use. In passing, I also noticed we test batch sizes of 1, 2, and 3 elements. Do we need to do that? If not, we could remove one of them to reduce test runtime by `~2s`.

Co-authored-by: Alfonso Subiotto Marqués <[email protected]>
@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build failed

@asubiotto
Copy link
Contributor Author

Trying again. GitHub API token environment variable GITHUB_API_TOKEN is not set, maybe a bad agent?

bors r=yuzefovich

@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build failed (retrying...)

@asubiotto
Copy link
Contributor Author

Ahh, actually seems to be test compilation errors that I missed. Fixing.

@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Build failed (retrying...)

@asubiotto
Copy link
Contributor Author

bors r-

@craig
Copy link
Contributor

craig bot commented Sep 19, 2019

Canceled

@asubiotto
Copy link
Contributor Author

OK, I think I got all of them

bors r=yuzefovich

@craig
Copy link
Contributor

craig bot commented Sep 20, 2019

Build failed

This will allow us to vary the batchSize private variable int the future
by providing a testing hook for external packages to modify the batch
size at will.

Release justification: Category 1 non-production code change.

Release note: None
@asubiotto
Copy link
Contributor Author

bors r=yuzefovich

craig bot pushed a commit that referenced this pull request Sep 20, 2019
40866: coldata: make coldata.BatchSize a package function r=yuzefovich a=asubiotto

This will allow us to vary the batchSize private variable int the future
by providing a testing hook for external packages to modify the batch
size at will.

Release justification: Category 1 non-production code change.

Release note: None

The only "interesting" changes are in `coldata/batch.go` and `colexec/utils_test.go` where I made a change to use `BatchSize()` rather than hardcode batch sizes to use. In passing, I also noticed we test batch sizes of 1, 2, and 3 elements. Do we need to do that? If not, we could remove one of them to reduce test runtime by `~2s`.

Co-authored-by: Alfonso Subiotto Marqués <[email protected]>
@craig
Copy link
Contributor

craig bot commented Sep 20, 2019

Build succeeded

@craig craig bot merged commit e9bfb4a into cockroachdb:master Sep 20, 2019
@asubiotto asubiotto deleted the batchsize branch October 29, 2019 20:06
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