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

pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [requested column not in index] #137972

Open
cockroach-teamcity opened this issue Dec 24, 2024 · 2 comments
Labels
branch-release-24.3.3-rc 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Dec 24, 2024

pkg/ccl/testccl/workload/schemachange/schemachange_test.TestWorkload failed on release-24.3.3-rc @ 40ada34c588d530f279841915621c2a4cca50dae:

  },
  "COMMIT"
 ],
 "expectedExecErrors": "",
 "expectedCommitErrors": "",
 "message": ""
}
{
 "workerId": 0,
 "clientTimestamp": "15:41:35.002072",
 "ops": [
  "BEGIN",
  {
   "sql": "SELECT t0.col26_w0_30 AS col0, t0.col26_w0_29 AS col1, t0.col26_w0_36 AS col2, t0.col26_w0_40 AS col3, t0.col26_w0_31 AS col4, t0.col_w0_26_w0_44 AS col5, t0.col26_w0_40 AS col6, t0.col26_w0_30 AS col7, t0.col26_w0_35 AS col8, t0.col26_w0_34 AS col9 FROM public.table_w0_26 AS t0 FETCH FIRST 1 ROWS ONLY",
   "potentialExecErr": "53100,53200,57014"
  }
 ],
 "expectedExecErrors": "",
 "expectedCommitErrors": "",
 "message": "ERROR: internal error: requested column col26_w0_31 not in index (SQLSTATE XX000)"
}
    schema_change_external_test.go:131: 
        	Error Trace:	pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:131
        	Error:      	Received unexpected error:
        	            	***UNEXPECTED ERROR: ERROR: internal error: requested column col26_w0_31 not in index (SQLSTATE XX000)
        	            	(1) attached stack trace
        	            	  -- stack trace:
        	            	  | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).run
        	            	  | 	pkg/workload/schemachange/schemachange.go:618
        	            	  | pkg/ccl/testccl/workload/schemachange/schemachange_test_test.TestWorkload.TestWorkload.func4.func6
        	            	  | 	pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:120
        	            	  | golang.org/x/sync/errgroup.(*Group).Go.func1
        	            	  | 	external/org_golang_x_sync/errgroup/errgroup.go:78
        	            	  | runtime.goexit
        	            	  | 	src/runtime/asm_amd64.s:1695
        	            	Wraps: (2) ***UNEXPECTED ERROR
        	            	Wraps: (3) ERROR: internal error: requested column col26_w0_31 not in index (SQLSTATE XX000)
        	            	Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) *pgconn.PgError
        	Test:       	TestWorkload
Schema Workload Stats
Total Schema Statements Executed = 19
Total Schema Statements Succeeded = 19
Total Schema Statement Expected Failures = 0
Total Transactions Committed = 6
Total Transactions Rolled Back = 15
Total Transactions Executed = 21
    schema_change_external_test.go:96: backup, tracing data, and system table dumps in /var/lib/engflow/worker/work/0/exec/bazel-out/k8-fastbuild/testlogs/pkg/ccl/testccl/workload/schemachange/schemachange_test/run_7_of_25/test.outputs/logTestWorkload1760670015
    panic.go:626: -- test log scope end --
test logs left over in: outputs.zip/logTestWorkload1760670015
--- FAIL: TestWorkload (6.84s)

Parameters:

  • attempt=1
  • run=7
  • shard=1
Help

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

Same failure on other branches

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-45826

@cockroach-teamcity cockroach-teamcity added branch-release-24.3.3-rc 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Dec 24, 2024
@annrpom annrpom changed the title pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [requested column col26_w0_31 not in index] Dec 26, 2024
@annrpom annrpom changed the title pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [requested column col26_w0_31 not in index] pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [requested column not in index] Dec 26, 2024
@annrpom
Copy link
Contributor

annrpom commented Dec 26, 2024

error comes from

// In test builds, verify that we aren't trying to fetch columns that are not
// available in the index.
if buildutil.CrdbTestBuild && s.IsSecondaryIndex {
colIDs := index.CollectKeyColumnIDs()
colIDs.UnionWith(index.CollectSecondaryStoredColumnIDs())
colIDs.UnionWith(index.CollectKeySuffixColumnIDs())
for i := range s.FetchedColumns {
if !colIDs.Contains(s.FetchedColumns[i].ColumnID) {
return errors.AssertionFailedf("requested column %s not in index", s.FetchedColumns[i].Name)
}
}
}

@annrpom
Copy link
Contributor

annrpom commented Dec 26, 2024

schema:

CREATE TABLE IF NOT EXISTS public.table_w0_26 (col26_w0_27 \"char\" NOT NULL, col26_w0_28 OID NULL, col26_w0_29 
INT2 NOT NULL, col26_w0_30 VARCHAR NOT NULL, col26_w0_31 STRING COLLATE da_DK NOT NULL, col26_w0_32 INT2 
NOT NULL, col26_w0_33 NAME, col26_w0_34 TSVECTOR NOT NULL, col26_w0_35 TSVECTOR, col26_w0_36 REGCLASS 
NULL, col26_w0_37 INT8 NOT NULL AS (col26_w0_29 + col26_w0_32) VIRTUAL, col26_w0_38 INT8 NOT NULL AS 
(col26_w0_29 + col26_w0_32) VIRTUAL, col26_w0_39 INT2 NOT NULL AS (abs(col26_w0_32)) VIRTUAL, col26_w0_40 
STRING AS (lower(CAST(col26_w0_35 AS STRING))) VIRTUAL, col26_w0_41 INT2 NOT NULL AS (abs(col26_w0_29)) 
STORED, col26_w0_42 INT8 NOT NULL AS (col26_w0_32 + col26_w0_29) VIRTUAL, col26_w0_43 INT2 NOT NULL AS 
(abs(col26_w0_32)) STORED, INDEX (col26_w0_27 DESC, col26_w0_28, col26_w0_42, abs(col26_w0_29)), UNIQUE 
(col26_w0_39 ASC, (col26_w0_32 + col26_w0_29)) STORING (col26_w0_27, col26_w0_29, col26_w0_30, col26_w0_33, 
col26_w0_34, col26_w0_35, col26_w0_36), INVERTED INDEX (col26_w0_34), INDEX (col26_w0_30 DESC) STORING 
(col26_w0_27, col26_w0_28, col26_w0_35, col26_w0_41, col26_w0_43))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch-release-24.3.3-rc 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-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

No branches or pull requests

2 participants