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

workload/bank: reset payload column before reuse #40215

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

ajkr
Copy link
Contributor

@ajkr ajkr commented Aug 26, 2019

Without this change, running the bank workload on a non-trivial number
of rows causes cockroach to fail with this error message:

panic: cannot overwrite value on flat Bytes: maxSetIndex=999, setIndex=0, consider using Reset

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajkr
Copy link
Contributor Author

ajkr commented Aug 26, 2019

The test failure is relevant:

$ make test PKG=./pkg/ccl/storageccl/ TESTS=TestWorkloadStorage
...
--- FAIL: TestWorkloadStorage (0.00s)
    require.go:157:
                Error Trace:    export_storage_test.go:560
                Error:          Not equal:
                                expected: "0,0,initial-dTqn\n1,0,initial-Pkyk\n2,0,initial-eJkM\n3,0,initial-TlNb"
                                actual  : "0,0,\n1,0,\n2,0,\n3,0,"

                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,4 +1,4 @@
                                -0,0,initial-dTqn
                                -1,0,initial-Pkyk
                                -2,0,initial-eJkM
                                -3,0,initial-TlNb
                                +0,0,
                                +1,0,
                                +2,0,
                                +3,0,
                Test:           TestWorkloadStorage
FAIL
FAIL    github.com/cockroachdb/cockroach/pkg/ccl/storageccl     0.058s
make: *** [Makefile:956: test] Error 1

@ajkr
Copy link
Contributor Author

ajkr commented Aug 26, 2019

oh, AppendVal() doesn't play nicely with Reset() because resetting doesn't change the length to zero. There is probably something to be done about improving abstractions here.

Without this change, running the bank workload on a non-trivial number
of rows causes cockroach to fail with this error message:

`panic: cannot overwrite value on flat Bytes: maxSetIndex=999, setIndex=0, consider using Reset`

Release note: None
Copy link
Contributor

@danhhz danhhz left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@danhhz
Copy link
Contributor

danhhz commented Aug 26, 2019

fyi @asubiotto @jordanlewis on some potential usability feedback here

@ajkr
Copy link
Contributor Author

ajkr commented Aug 26, 2019

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 26, 2019

Build failed

@jordanlewis
Copy link
Member

Thanks for kicking our tires - yeah, this appears like a rough corner. @asubiotto will take a look when he gets back from vacation in a week.

@jordanlewis
Copy link
Member

Also cc @yuzefovich.

@ajkr
Copy link
Contributor Author

ajkr commented Aug 26, 2019

bors r+

craig bot pushed a commit that referenced this pull request Aug 26, 2019
40215: workload/bank: reset payload column before reuse r=ajkr a=ajkr

Without this change, running the bank workload on a non-trivial number
of rows causes cockroach to fail with this error message:

`panic: cannot overwrite value on flat Bytes: maxSetIndex=999, setIndex=0, consider using Reset`

Release note: None

Co-authored-by: Andrew Kryczka <andrew.kryczka2@gmail.com>
@craig
Copy link
Contributor

craig bot commented Aug 26, 2019

Build succeeded

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