cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.09k stars 3.81k forks source link

pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [column name in view "crdb_internal_mvcc_timestamp" conflicts with a system column name] #130501

Closed github-actions[bot] closed 1 month ago

github-actions[bot] commented 1 month ago

pkg/ccl/testccl/workload/schemachange/schemachange_test.TestWorkload failed on master @ 52b3ff82042233fddaef8ae171d796ccadca9d51:

                              |   |     github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/store_send.go:193
                              |   | github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*Stores).SendWithWriteBytes
                              |   |     github.com/cockroachdb/cockroach/pkg/kv/kvserver/pkg/kv/kvserver/stores.go:202
                              |   | github.com/cockroachdb/cockroach/pkg/server.(*Node).batchInternal
                              |   |     github.com/cockroachdb/cockroach/pkg/server/node.go:1635
                              |   | github.com/cockroachdb/cockroach/pkg/server.(*Node).Batch
                              |   |     github.com/cockroachdb/cockroach/pkg/server/node.go:1836
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.func1
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:718
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.NewServerEx.ServerInterceptor.func12
                              |   |     github.com/cockroachdb/cockroach/pkg/util/tracing/grpcinterceptor/grpc_interceptor.go:97
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.chainUnaryServerInterceptors.bindUnaryServerInterceptorToHandler.func4
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:829
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.NewServerEx.func3
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:170
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.chainUnaryServerInterceptors.bindUnaryServerInterceptorToHandler.func4
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:829
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.kvAuth.unaryInterceptor
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/auth.go:95
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.chainUnaryServerInterceptors.bindUnaryServerInterceptorToHandler.func4
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:829
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.NewServerEx.func1.1
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:137
                              |   | github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunTaskWithErr
                              |   |     github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:336
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.NewServerEx.func1
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:135
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.chainUnaryServerInterceptors.bindUnaryServerInterceptorToHandler.func4
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:829
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.makeInternalClientAdapter.func2
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:728
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.NewContext.ClientInterceptor.func8
                              |   |     github.com/cockroachdb/cockroach/pkg/util/tracing/grpcinterceptor/grpc_interceptor.go:228
                              |   | github.com/cockroachdb/cockroach/pkg/rpc.getChainUnaryInvoker.func1
                              |   |     github.com/cockroachdb/cockroach/pkg/rpc/pkg/rpc/context.go:913
                              | Wraps: (2) single entry value with no default column id
                              | Error types: (1) *withstack.withStack (2) *errutil.leafError (SQLSTATE XXUUU)
                            Error types: (1) *markers.withMark (2) *schemachange.ErrorState (3) *withstack.withStack (4) *errutil.withPrefix (5) *withstack.withStack (6) *errutil.withPrefix (7) *pgconn.PgError
            Test:           TestWorkload
Schema Workload Stats
Total Schema Statements Executed = 86
Total Schema Statements Succeeded = 86
Total Schema Statement Expected Failures = 0
Total Transactions Committed = 59
Total Transactions Rolled Back = 50
Total Transactions Executed = 109
    schema_change_external_test.go:99: 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/test.outputs/logTestWorkload3869230361
    panic.go:626: -- test log scope end --
test logs left over in: outputs.zip/logTestWorkload3869230361
--- FAIL: TestWorkload (19.95s)

Parameters:

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

Same failure on other branches

- #130283 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot T-sql-foundations branch-release-23.1 release-blocker] - #129462 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot P-2 T-sql-foundations branch-release-24.2.1-rc] - #128953 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed ["enum type does not exist" error code when setting a DEFAULT] [C-test-failure O-robot P-3 T-sql-foundations branch-release-23.2.10-rc]

/cc @cockroachdb/sql-foundations

This test on roachdash | Improve this report!

Jira issue: CRDB-42094

cockroach-teamcity commented 1 month ago

pkg/ccl/testccl/workload/schemachange/schemachange_test.TestWorkload failed on master @ 67e99ebec74c1f6a6dfbf1cc0bca2d255a55f867:

   {
    "query": "SELECT EXISTS (SELECT * FROM schema_w0_51.table_w1_55)",
    "result": false
   },
   {
    "query": "WITH descriptors AS (SELECT crdb_internal.pb_to_json('cockroach.sql.sqlbase.Descriptor', descriptor)-\u003e'table' AS d FROM system.descriptor WHERE id = $1::REGCLASS) SELECT EXISTS (SELECT mut FROM (SELECT json_array_elements(d-\u003e'mutations') AS mut FROM descriptors) WHERE (mut-\u003e'primaryKeySwap') IS NOT NULL)",
    "queryArgs": [
     "schema_w0_51.table_w1_55"
    ],
    "result": false
   }
  ],
  "previousStatements": [
   "ALTER TABLE schema_w0_51.table_w1_55 ADD COLUMN col_w1_55_w0_110 schema_w0_51.enum_w1_53 NOT NULL"
  ]
 }
}
    schema_change_external_test.go:134: 
            Error Trace:    pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:134
            Error:          Received unexpected error:
                            ***UNEXPECTED COMMIT ERROR; Received an unexpected commit error: ERROR: transaction committed but schema change aborted with error: (23502): validation of column "col_w1_55_w0_110" NOT NULL failed on row: col55_w1_56=-10, col55_w1_57='00:00:00', col55_w1_58=-211646.0892476023350, col55_w1_59='1976-10-30 14:24:06.000906', "col�55_w1_60"=e'\U00034848\U0009CB82' COLLATE de_DE, col55_w1_61=NULL, col55_w1_62='1988-07-10 05:13:16.000995+00', "col55%p_w1_63"=B'10101000010001010101110101001011001001000110', "col\\U000FCCF355_w1_64"=e'\x01v4~2', "co%ql55_w1_65"=116, "c\\u8DE2ol55_w1_66"='60 years 8 mons 759 days 19:34:32.003398', col_w1_55_w0_110=NULL (SQLSTATE 23502)
                            (1) forced error mark
                              | "fatal error when running txn"
                              | github.com/cockroachdb/errors/withstack/*withstack.withStack::
                            Wraps: (2)
                            Wraps: (3) attached stack trace
                              -- stack trace:
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).run
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/schemachange.go:658
                              | pkg/ccl/testccl/workload/schemachange/schemachange_test_test.TestWorkload.TestWorkload.func4.func6
                              |     pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:123
                              | golang.org/x/sync/errgroup.(*Group).Go.func1
                              |     golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:78
                              | runtime.goexit
                              |     src/runtime/asm_amd64.s:1695
                            Wraps: (4) ***UNEXPECTED COMMIT ERROR; Received an unexpected commit error
                            Wraps: (5) ERROR: transaction committed but schema change aborted with error: (23502): validation of column "col_w1_55_w0_110" NOT NULL failed on row: col55_w1_56=-10, col55_w1_57='00:00:00', col55_w1_58=-211646.0892476023350, col55_w1_59='1976-10-30 14:24:06.000906', "col�55_w1_60"=e'\U00034848\U0009CB82' COLLATE de_DE, col55_w1_61=NULL, col55_w1_62='1988-07-10 05:13:16.000995+00', "col55%p_w1_63"=B'10101000010001010101110101001011001001000110', "col\\U000FCCF355_w1_64"=e'\x01v4~2', "co%ql55_w1_65"=116, "c\\u8DE2ol55_w1_66"='60 years 8 mons 759 days 19:34:32.003398', col_w1_55_w0_110=NULL (SQLSTATE 23502)
                            Error types: (1) *markers.withMark (2) *schemachange.ErrorState (3) *withstack.withStack (4) *errutil.withPrefix (5) *pgconn.PgError
            Test:           TestWorkload
Schema Workload Stats
Total Schema Statements Executed = 63
Total Schema Statements Succeeded = 63
Total Schema Statement Expected Failures = 0
Total Transactions Committed = 40
Total Transactions Rolled Back = 37
Total Transactions Executed = 77
    schema_change_external_test.go:99: 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_18_of_25/test.outputs/logTestWorkload2391922755
    panic.go:626: -- test log scope end --
test logs left over in: outputs.zip/logTestWorkload2391922755
--- FAIL: TestWorkload (13.90s)

Parameters:

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

Same failure on other branches

- #130283 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot T-sql-foundations branch-release-23.1 release-blocker] - #129462 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot P-2 T-sql-foundations branch-release-24.2.1-rc] - #128953 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed ["enum type does not exist" error code when setting a DEFAULT] [C-test-failure O-robot P-3 T-sql-foundations branch-release-23.2.10-rc]

This test on roachdash | Improve this report!

cockroach-teamcity commented 1 month ago

pkg/ccl/testccl/workload/schemachange/schemachange_test.TestWorkload failed with artifacts on master @ b7f7a6edc32c68d4fb74e2e2b3cbd1df7b5bc8a2:

    "queryArgs": [
     "schema_w1_208",
     "view_w0_237"
    ],
    "result": false
   }
  ],
  "previousStatements": [
   "CREATE TABLE schema_w0_48.table_w0_223 (\"col2 23_w0_224\" VECTOR, \"col2 23_w0_225\" INT4 NOT NULL, col223_w0_226 INT8 NULL, col223_w0_227 TSQUERY NOT NULL, \"c{ol223_w0_228\" INET NULL, col223😙_w0_229 TSQUERY NULL, \"col22\r3%p_w0_230\" REGTYPE NULL, col223_w0_231 INT4 NOT NULL AS (abs(\"col2 23_w0_225\")) VIRTUAL, \"coL223_w0_232\" INT8 NULL AS (\"col2 23_w0_225\" + col223_w0_226) VIRTUAL, \"co😜l 223_w0_233\" INT8 NULL AS (col223_w0_226 + \"col2 23_w0_225\") STORED, col223_w0_234 STRING NULL AS (lower(CAST(col223😙_w0_229 AS STRING))) STORED, col223_w0_235 INT8 NOT NULL AS (col223_w0_226 + \"col2 23_w0_225\") VIRTUAL, \"co%vl22%p3_w0_236\" INT8 NULL AS (col223_w0_226 + \"col2 23_w0_225\") VIRTUAL, PRIMARY KEY (col223_w0_235 DESC), FAMILY (\"col2 23_w0_224\"), FAMILY (\"col22\r3%p_w0_230\", \"col2 23_w0_225\"), FAMILY (col223_w0_226), FAMILY (col223_w0_227), FAMILY (\"co😜l 223_w0_233\"), FAMILY (\"c{ol223_w0_228\", col223_w0_234, col223😙_w0_229))",
   "CREATE VIEW schema_w1_208.view_w0_237 AS SELECT schema_w1_7.table_w1_47.crdb_internal_mvcc_timestamp, schema_w1_7.table_w1_48.col48_w1_51, schema_w1_7.table_w1_48.col48_w1_52, public.table_w1_8.col8_w1_10 FROM schema_w1_7.table_w1_47, schema_w1_7.table_w1_48, public.table_w1_8"
  ]
 }
}
    schema_change_external_test.go:134: 
            Error Trace:    pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:134
            Error:          Received unexpected error:
                            ***UNEXPECTED ERROR; Received an unexpected execution error.: ERROR: relation "view_w0_237" (163): column name "crdb_internal_mvcc_timestamp" conflicts with a system column name (SQLSTATE 42701)
                            (1) forced error mark
                              | "fatal error when running txn"
                              | github.com/cockroachdb/errors/withstack/*withstack.withStack::
                            Wraps: (2)
                            Wraps: (3) attached stack trace
                              -- stack trace:
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*opStmt).executeStmt
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/operation_generator.go:3180
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).runInTxn
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/schemachange.go:499
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).run
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/schemachange.go:587
                              | pkg/ccl/testccl/workload/schemachange/schemachange_test_test.TestWorkload.TestWorkload.func4.func6
                              |     pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:123
                              | golang.org/x/sync/errgroup.(*Group).Go.func1
                              |     golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:78
                              | runtime.goexit
                              |     src/runtime/asm_arm64.s:1222
                            Wraps: (4) ***UNEXPECTED ERROR; Received an unexpected execution error.
                            Wraps: (5) ERROR: relation "view_w0_237" (163): column name "crdb_internal_mvcc_timestamp" conflicts with a system column name (SQLSTATE 42701)
                            Error types: (1) *markers.withMark (2) *schemachange.ErrorState (3) *withstack.withStack (4) *errutil.withPrefix (5) *pgconn.PgError
            Test:           TestWorkload
Schema Workload Stats
Total Schema Statements Executed = 150
Total Schema Statements Succeeded = 150
Total Schema Statement Expected Failures = 0
Total Transactions Committed = 88
Total Transactions Rolled Back = 89
Total Transactions Executed = 177
    schema_change_external_test.go:99: backup, tracing data, and system table dumps in /artifacts/tmp/_tmp/67537770b84c3a4ea177539c1e46bd43/logTestWorkload339941363
    panic.go:626: -- test log scope end --
test logs left over in: /artifacts/tmp/_tmp/67537770b84c3a4ea177539c1e46bd43/logTestWorkload339941363
--- FAIL: TestWorkload (20.43s)
Help

See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)

Same failure on other branches

- #130283 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot T-sql-foundations branch-release-23.1 release-blocker] - #129462 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot P-2 T-sql-foundations branch-release-24.2.1-rc] - #128953 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed ["enum type does not exist" error code when setting a DEFAULT] [C-test-failure O-robot P-3 T-sql-foundations branch-release-23.2.10-rc]

This test on roachdash | Improve this report!

cockroach-teamcity commented 1 month ago

pkg/ccl/testccl/workload/schemachange/schemachange_test.TestWorkload failed on master @ 66ff4329d380562ec95466ba108b72be721ff6c9:

    "query": "SELECT EXISTS (SELECT table_name FROM information_schema.views WHERE (table_schema = $1) AND (table_name = $2))",
    "queryArgs": [
     "public",
     "view_w0_61"
    ],
    "result": false
   }
  ],
  "previousStatements": [
   "CREATE VIEW public.view_w0_61 AS SELECT public.table_w1_63.crdb_internal_mvcc_timestamp, public.table_w1_30.col30_w1_33, public.table_w1_30.col30_w1_36, public.table_w1_30.col30_w1_37, public.table_w1_30.col30_w1_35, public.table_w1_30.col30_w1_38, public.table_w1_30.col30_w1_34, public.table_w1_30.col_w1_30_w1_41, public.table_w1_30.col30_w1_31, public.table_w1_30.col30_w1_40 FROM public.table_w1_63, public.table_w1_30"
  ]
 }
}
    schema_change_external_test.go:134: 
            Error Trace:    pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:134
            Error:          Received unexpected error:
                            ***UNEXPECTED ERROR; Received an unexpected execution error.: ERROR: relation "view_w0_61" (127): column name "crdb_internal_mvcc_timestamp" conflicts with a system column name (SQLSTATE 42701)
                            (1) forced error mark
                              | "fatal error when running txn"
                              | github.com/cockroachdb/errors/withstack/*withstack.withStack::
                            Wraps: (2)
                            Wraps: (3) attached stack trace
                              -- stack trace:
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*opStmt).executeStmt
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/operation_generator.go:3180
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).runInTxn
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/schemachange.go:499
                              | github.com/cockroachdb/cockroach/pkg/workload/schemachange.(*schemaChangeWorker).run
                              |     github.com/cockroachdb/cockroach/pkg/workload/schemachange/schemachange.go:587
                              | pkg/ccl/testccl/workload/schemachange/schemachange_test_test.TestWorkload.TestWorkload.func4.func6
                              |     pkg/ccl/testccl/workload/schemachange/schemachange_test_test/pkg/ccl/testccl/workload/schemachange/schema_change_external_test.go:123
                              | golang.org/x/sync/errgroup.(*Group).Go.func1
                              |     golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:78
                              | runtime.goexit
                              |     src/runtime/asm_amd64.s:1695
                            Wraps: (4) ***UNEXPECTED ERROR; Received an unexpected execution error.
                            Wraps: (5) ERROR: relation "view_w0_61" (127): column name "crdb_internal_mvcc_timestamp" conflicts with a system column name (SQLSTATE 42701)
                            Error types: (1) *markers.withMark (2) *schemachange.ErrorState (3) *withstack.withStack (4) *errutil.withPrefix (5) *pgconn.PgError
            Test:           TestWorkload
Schema Workload Stats
Total Schema Statements Executed = 61
Total Schema Statements Succeeded = 61
Total Schema Statement Expected Failures = 0
Total Transactions Committed = 45
Total Transactions Rolled Back = 30
Total Transactions Executed = 75
    schema_change_external_test.go:99: 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_4_of_25/test.outputs/logTestWorkload2778775737
    panic.go:626: -- test log scope end --
test logs left over in: outputs.zip/logTestWorkload2778775737
--- FAIL: TestWorkload (15.78s)

Parameters:

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

Same failure on other branches

- #130283 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot T-sql-foundations branch-release-23.1 release-blocker] - #129462 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed [C-test-failure O-robot P-2 T-sql-foundations branch-release-24.2.1-rc] - #128953 pkg/ccl/testccl/workload/schemachange/schemachange_test: TestWorkload failed ["enum type does not exist" error code when setting a DEFAULT] [C-test-failure O-robot P-3 T-sql-foundations branch-release-23.2.10-rc]

This test on roachdash | Improve this report!

rafiss commented 1 month ago

For the column name "crdb_internal_mvcc_timestamp" conflicts with a system column name error, we should fix this by updating the workload so that it avoids creating a view that references crdb_internal_* columns.

rafiss commented 1 month ago

dupe of https://github.com/cockroachdb/cockroach/issues/130756

spilchen commented 1 month ago

Fixed with #131045