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/importer: TestExportImportBank failed #121176

Closed
cockroach-teamcity opened this issue Mar 27, 2024 · 2 comments · Fixed by #121220
Closed

sql/importer: TestExportImportBank failed #121176

cockroach-teamcity opened this issue Mar 27, 2024 · 2 comments · Fixed by #121220
Labels
A-testing Testing tools and infrastructure branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Mar 27, 2024

sql/importer.TestExportImportBank failed on master @ 3292e23e914f2b5a63e892fef1705ad476be4bd7:

=== RUN   TestExportImportBank
    test_log_scope.go:170: test logs captured to: outputs.zip/logTestExportImportBank3022263666
    test_log_scope.go:81: use -show-logs to present logs inline
    test_server_shim.go:157: automatically injected an external process virtual cluster under test; see comment at top of test_server_shim.go for details.
    exportcsv_test.go:146: -- test log scope end --
test logs left over in: outputs.zip/logTestExportImportBank3022263666
--- FAIL: TestExportImportBank (9.82s)
=== RUN   TestExportImportBank/null=NULL
    exportcsv_test.go:133: error executing query="CREATE TABLE bank2 (\n\t\tid INT PRIMARY KEY,\n\t\tbalance INT,\n\t\tpayload STRING,\n\t\tFAMILY (id, balance, payload)\n\t)" args=[]: pq: relation "defaultdb.public.bank2" already exists
    --- FAIL: TestExportImportBank/null=NULL (0.67s)
=== RUN   TestExportImportBank/null=
    exportcsv_test.go:134: error executing query="IMPORT INTO bank2 CSV DATA ($1) WITH delimiter = '|', nullif = ''" args=["userfile:/t/TestExportImportBank/null=/*"]: pq: result is ambiguous: error=[NotLeaseHolderError] proxy failed, update client information desc: r68:/Tenant/10{-/Table/104/1/10} [(n1,s1):1, (n3,s3):2, (n2,s2):3, next=4, gen=10, sticky=1711523159.405364670,0], lease: repl=(n3,s3):2 seq=3 start=1711519561.447063165,0 exp=1711519567.446765215,0 pro=1711519561.446765215,0, closed_timestamp_policy: LAG_BY_CLUSTER_SETTING != et:desc:r68:/Tenant/10{-/Table/11} [(n1,s1):1, (n3,s3):2, (n2,s2):3, next=4, gen=11, sticky=1711523159.405364670,0], lease:repl=(n3,s3):2 seq=3 start=1711519561.447063165,0 exp=1711519567.446765215,0 pro=1711519561.446765215,0; r68: replica not lease holder; current lease is repl=(n3,s3):2 seq=3 start=1711519561.447063165,0 exp=1711519567.446765215,0 pro=1711519561.446765215,0 [propagate] (last error: key range /Tenant/10/Table/3/1/107/2/1-/Tenant/10/Table/53/1/955020615536803841/"legacy_payload"/1915-10-07T17:53:55.639340999Z/0/NULL outside of bounds of range /Tenant/10-/Tenant/10/Table/11; suggested ranges: [desc: r68:/Tenant/10{-/Table/11} [(n1,s1):1, (n3,s3):2, (n2,s2):3, next=4, gen=11, sticky=1711523159.405364670,0], lease: repl=(n3,s3):2 seq=3 start=1711519561.447063165,0 exp=1711519567.446765215,0 pro=1711519561.446765215,0, closed_timestamp_policy: LAG_BY_CLUSTER_SETTING desc: r108:/Tenant/10/Table/1{1-04/1/10} [(n1,s1):1, (n3,s3):2, (n2,s2):3, next=4, gen=11], lease: repl=(n3,s3):2 seq=3 start=1711519561.447063165,0 exp=1711519567.446765215,0 pro=1711519561.446765215,0, closed_timestamp_policy: LAG_BY_CLUSTER_SETTING])
    --- FAIL: TestExportImportBank/null= (2.41s)

Parameters:

  • attempt=1
  • run=27
  • shard=3
Help

See also: How To Investigate a Go Test Failure (internal)

/cc @cockroachdb/sql-queries

This test on roachdash | Improve this report!

Jira issue: CRDB-37110

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-queries SQL Queries Team labels Mar 27, 2024
@cockroach-teamcity cockroach-teamcity added this to the 24.1 milestone Mar 27, 2024
@github-project-automation github-project-automation bot moved this to Triage in SQL Queries Mar 27, 2024
@rytaft
Copy link
Collaborator

rytaft commented Mar 27, 2024

The second failure looks like a dup of #121098. The first one seems new.

@rytaft
Copy link
Collaborator

rytaft commented Mar 27, 2024

Looking at the code, it seems like we run the "null=" and "null=NULL" tests on the same database, one after the other. Since the "null=" test failed, we probably didn't successfully drop the table bank2, which is why it already existed for the "null=NULL" test. I'll submit a patch to make this test more reliable.

@rytaft rytaft added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-testing Testing tools and infrastructure P-3 Issues/test failures with no fix SLA and removed release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Mar 27, 2024
craig bot pushed a commit that referenced this issue Mar 27, 2024
120809: sql: add ImportType to descriptor r=dt a=stevendanna

This adds an ImportType field to table descriptors. We need this field
if we want to support disabling ImportEpoch writing via a cluster
setting since we won't necessarily be able to trust that a non-zero
ImportEpoch is actually from the currently in-progress IMPORT.

Epic: none
Release note: None



121220: sql/importer: deflake TestExportImportBank r=rytaft a=rytaft

This commit fixes an issue caused by running two tests on the same database. Each test creates a table `bank2` and drops it at the end of the test. However, if the first test fails after creating the table, the table might not be successfully dropped. Therefore, the second test would fail when attempting to create the table since it already exists. This commit fixes this problem by adding a line to defer the `DROP TABLE` command right after it's created..

Fixes #121176

Release note: None

121223: workflows: some small improvements r=rail a=rickystewart

1. Remember to use RBE for the build of `mirror` in `check-generated-code`.
2. Use the `build.sh` script for Windows builds.

Epic: CRDB-8308
Release note: None

Co-authored-by: Steven Danna <[email protected]>
Co-authored-by: Rebecca Taft <[email protected]>
Co-authored-by: Ricky Stewart <[email protected]>
@craig craig bot closed this as completed in 9228bdd Mar 27, 2024
@github-project-automation github-project-automation bot moved this from Triage to Done in SQL Queries Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Testing tools and infrastructure branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). O-robot Originated from a bot. P-3 Issues/test failures with no fix SLA T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants