yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.92k stars 1.06k forks source link

[YSQL][LST] ERROR: catalog is missing ... attribute(s) for relid ... #13269

Open def- opened 2 years ago

def- commented 2 years ago

Jira Link: DB-2914

Description

$ cd ~/code/yugabyte-db
$ git checkout 226465305d
$ ./yb_build.sh release
$ bin/yb-ctl --replication_factor 3 create --tserver_flags=yb_enable_read_committed_isolation=true,ysql_num_shards_per_tserver=1,enable_stream_compression=true,stream_compression_algo=1,yb_num_shards_per_tserver=1 --master_flags=yb_enable_read_committed_isolation=true,enable_stream_compression=true,stream_compression_algo=1,enable_automatic_tablet_splitting=true,tablet_split_low_phase_shard_count_per_node=40,tablet_split_high_phase_shard_count_per_node=50
$ cd ~/code/yb-long-system-test
$ git checkout 7fda6b15
$ python3.9 ./long_system_test.py --nodes=127.0.0.1:5433,127.0.0.2:5433,127.0.0.3:5433 --threads=10 --runtime=60 --max-columns=10 --complexity=full --seed=919065
2022-07-09 18:16:30,685 MainThread INFO     Reproduce with: git checkout 7fda6b15 && ./long_system_test.py --nodes=127.0.0.1:5433,127.0.0.2:5433,127.0.0.3:5433 --threads=10 --runtime=60 --max-columns=10 --complexity=full --seed=919065
2022-07-09 18:16:31,172 MainThread INFO     Database version: PostgreSQL 11.2-YB-2.15.1.0-b0 on x86_64-pc-linux-gnu, compiled by clang version 12.0.1 (https://github.com/yugabyte/llvm-project.git bdb147e675d8c87cee72cc1f87c4b82855977d94), 64-bit
2022-07-09 18:16:31,174 MainThread INFO     Creating tables for database db_lst_919065
2022-07-09 18:16:56,373 MainThread INFO     Starting worker_0: CreateIndexAction, DropIndexAction, SetConfigAction, AddColumnAction
2022-07-09 18:16:56,374 MainThread INFO     Starting worker_1: CreateIndexAction, DropIndexAction, SetConfigAction, AddColumnAction
2022-07-09 18:16:56,375 MainThread INFO     Starting worker_2: SingleInsertAction, SingleUpdateAction, SingleDeleteAction, BulkInsertAction, BulkUpdateAction, SetConfigAction
2022-07-09 18:16:56,376 MainThread INFO     Starting worker_3: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,378 MainThread INFO     Starting worker_4: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,380 MainThread INFO     Starting worker_5: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,381 MainThread INFO     Starting worker_6: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,404 MainThread INFO     Starting worker_7: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,404 MainThread INFO     Starting worker_8: RandomSelectAction, SetConfigAction
2022-07-09 18:16:56,421 MainThread INFO     Starting worker_9: RandomSelectAction, SetConfigAction
2022-07-09 18:17:06,434 MainThread INFO     Worker queries/s: [001.0][000.0][003.7][000.9][001.6][001.3][001.4][001.2][001.9][001.5]
[...]
2022-07-09 18:29:37,277 MainThread INFO     Worker queries/s: [000.9][000.1][001.9][000.7][000.3][000.5][001.0][000.5][000.8][001.6]
2022-07-09 18:29:45,955 worker_9   ERROR    Unexpected query failure: InternalError_
Query: EXPLAIN (ANALYZE TRUE, VERBOSE FALSE, COSTS TRUE, BUFFERS FALSE, TIMING FALSE, SUMMARY FALSE, FORMAT TEXT)
EXECUTE stmt;
  values: None
  runtime: 2022-07-09 18:29:45.838 - 2022-07-09 18:29:45.954
  supports explain: False
  supports rollback: False
  affected rows: None
Action: RandomSelectAction
Error class: InternalError_
Error code: XX000
Error message: ERROR:  catalog is missing 7 attribute(s) for relid 17315
CONTEXT:  Catalog Version Mismatch: A DDL occurred while processing this query. Try again.
Transaction isolation level: committed
DB Node: host: 127.0.0.1, port: 5433
DB Backend PID: 3619394

lst_2022-07-09_18:16:30_919065.zip This also happened with SQLancer: https://github.com/yugabyte/yugabyte-db/issues/10434

arminfelder commented 2 years ago

I have the same issue, with Apache Hive:

hive_1  | 193/1206     CREATE TABLE "SORT_COLS" ( 
hive_1  | "SD_ID" bigint NOT NULL, 
hive_1  | "COLUMN_NAME" character varying(767) DEFAULT NULL::character varying, 
hive_1  | "ORDER" bigint NOT NULL, 
hive_1  | "INTEGER_IDX" bigint NOT NULL 
hive_1  | );
hive_1  | Error: ERROR: catalog is missing 4 attribute(s) for relid 18045 (state=XX000,code=0)
hive_1  | org.postgresql.util.PSQLException: ERROR: catalog is missing 4 attribute(s) for relid 18045
hive_1  |       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2674)
hive_1  |       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2364)
hive_1  |       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:354)
hive_1  |       at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:484)
hive_1  |       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:404)
hive_1  |       at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:325)
hive_1  |       at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:311)
hive_1  |       at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:287)
hive_1  |       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:282)
hive_1  |       at sqlline.Commands.execute(Commands.java:823)
hive_1  |       at sqlline.Commands.sql(Commands.java:733)
hive_1  |       at sqlline.SqlLine.dispatch(SqlLine.java:795)
hive_1  |       at sqlline.SqlLine.runCommands(SqlLine.java:1706)
hive_1  |       at sqlline.Commands.run(Commands.java:1317)
hive_1  |       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
hive_1  |       at java.base/java.lang.reflect.Method.invoke(Method.java:578)
hive_1  |       at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
hive_1  |       at sqlline.SqlLine.dispatch(SqlLine.java:791)
hive_1  |       at sqlline.SqlLine.initArgs(SqlLine.java:595)
hive_1  |       at sqlline.SqlLine.begin(SqlLine.java:643)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.runSqlLine(MetastoreSchemaTool.java:1034)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.runSqlLine(MetastoreSchemaTool.java:1007)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.doInit(MetastoreSchemaTool.java:596)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.doInit(MetastoreSchemaTool.java:574)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.run(MetastoreSchemaTool.java:1273)
hive_1  |       at org.apache.hadoop.hive.metastore.tools.MetastoreSchemaTool.main(MetastoreSchemaTool.java:1178)
hive_1  |       at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
hive_1  |       at java.base/java.lang.reflect.Method.invoke(Method.java:578)
hive_1  |       at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
hive_1  |       at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
hive_1  | Aborting command set because "force" is false and command failed: "CREATE TABLE "SORT_COLS" ( 
hive_1  | "SD_ID" bigint NOT NULL, 
hive_1  | "COLUMN_NAME" character varying(767) DEFAULT NULL::character varying, 
hive_1  | "ORDER" bigint NOT NULL, 
hive_1  | "INTEGER_IDX" bigint NOT NULL 
hive_1  | );"
hive_1  | Closing: org.postgresql.jdbc.PgConnection
hive_1  | Schema initialization FAILED! Metastore state would be inconsistent !!
hive_1  | Underlying cause: java.io.IOException : Schema script failed, errorcode OTHER
hive_1  | Use --verbose for detailed stacktrace.
hive_1  | *** schemaTool failed ***