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

importccl: failure in TestImportCSVStmt/primary-key-dup #35943

Closed
knz opened this issue Mar 19, 2019 · 0 comments · Fixed by #35944
Closed

importccl: failure in TestImportCSVStmt/primary-key-dup #35943

knz opened this issue Mar 19, 2019 · 0 comments · Fixed by #35944
Assignees

Comments

@knz
Copy link
Contributor

knz commented Mar 19, 2019

My PR #35937 just introduced a regression:

TestImportCSVStmt/primary-key-dup 

sql/distsqlpb/data.go:157 in NewError(): (XX000) internal error: uncaught error: Invalid argument: Keys must be added in order
-- detail --
data.go:157: uncaught error: %+v | invalid argument keys must be added in order
github.com/cockroachdb/cockroach/pkg/sql/distsqlpb/data.go:157: in NewError()
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/stream_encoder.go:109: in AddMetadata()
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/outbox.go:125: in addRow()
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/outbox.go:293: in mainLoop()
github.com/cockroachdb/cockroach/pkg/sql/distsqlrun/outbox.go:413: in run()

The problem is that the error should be handled internally as a regular "duplicate row in unique index error" but the check for that is defective, see related issue #35942.

I will fix the regression by avoiding the unwrap (this will make do in 19.1) but the root cause #35942 will remain to be addressed.

cc @dt @danhhz

@knz knz self-assigned this Mar 19, 2019
craig bot pushed a commit that referenced this issue Mar 19, 2019
35912: roachtest: begin the release qualification roachtest whitelist r=nvanbenschoten a=danhhz

Starting with `tpcc/nodes=3/w=max` for now so I can get the teamcity
plumbing done. This test verifies that running our claimed max TPCC
warehouses works. The max depends on the hardware configuration:
currently 1450 on a 3-node GCE n1-standard-1 cluster or 2200 on a 3-node
AWS c5d.4xlarge cluster.

Release note: None

35915: sql: do not create stats on inverted index columns r=rytaft a=rytaft

This commit fixes an issue in which the default columns for
`CREATE STATISTICS` included inverted index columns. Since we
cannot create statistics on JSON columns, running automatic
statistics on a table with an inverted index resulted in the
error "unable to encode table key: *tree.DJSON". This commit
fixes the issue by skipping over inverted indexes when
determining the default columns for `CREATE STATISTICS`.

Fixes #35764

Release note (bug fix): Fixed an error that occurred when
creating statistics on tables with an inverted index.

35944: distsqlpb,importccl: fix a regression in IMPORT r=RaduBerinde a=knz

Fixes #35943.

This patch ensures that the full error message (pre-unwrap) is
included for errors that flow out of distsql process towards the
gateway.

This is important because some other internal mechanisms inside
CockroachDB are expecting to see the prefixes introduced by
errors.Wrap to decide other things (a bad idea, but not fixable in the
short term), for example see issue #35942.

Release note: None

Co-authored-by: Daniel Harrison <[email protected]>
Co-authored-by: Rebecca Taft <[email protected]>
Co-authored-by: Raphael 'kena' Poss <[email protected]>
@craig craig bot closed this as completed in #35944 Mar 19, 2019
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 a pull request may close this issue.

1 participant