Klustron Cluster Reference Guide
Klustron Cluster Reference Guide
01 Error Codes
This section introduces error codes specific to Klustron. For common error codes in PostgreSQL and MySQL, see the following links:
PostgreSQL error codes:
https://www.postgresql.org/docs/11/errcodes-appendix.html
MySQL error codes:
https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html
Storage node error codes:
- Error Code:9000
Strong synchronization wait timeout. For a detailed explanation of strong synchronization, see:
https://doc.kunlunbase.com/zh/Klustron_Storage_Cluster_Fullsync.html
- Error Code:9001
Obsolete as of version V1.2.1 or later.
- Error Code:9002
SEQUENCE sequence already exists.
- Error Code:9003
Sequence in the database was erroneously created by direct insertion into the kunlun_sysdb.sequences system table and not cached. It might be usable or completely unusable after mysqld restart.
- Error Code:9004
SEQUENCE sequence does not exist.
- Error Code:9005
SEQUENCE sequence does not cycle after reaching the maximum value of available values.
- Error Code:9006
Incorrect sequence parameter value specified.
- Error Code:9007
SEQUENCE sequence cannot be deleted or modified because it is in use.
- Error Code:9008
ENTITY entity type not found.
02 Metadata Table Descriptions
pg_cluster_meta
Field descriptions:
[comp_node_id]
- Unique ID of the current computing node of the current cluster, specified by the associated
cluster_name
.
[cluster_id]
- Unique ID of the current cluster specified by the cluster_name.
[cluster_master_id]
- Unique ID of the master instance of the metadata cluster, representing the read-write node of a MySQL MGR cluster.
[cluster_name]
- Name of the current cluster.
[comp_node_name]
- Name of the current compute node.
pg_cluster_meta_nodes
Field descriptions:
[server_id]
- Value of the MySQL server_id variable, used as a primary key to identify rows.
[cluster_id]
- ID of the cluster, the same for all rows of such a table.
[is_master]
- Whether the node is the primary.
[port]
- Port number used for connection.
[hostaddr]
- IP or DNS information used for connection.
[user_name]
- Username used for connection.
[passwd]
- Password used for connection.
pg_computing_node_stat
Field descriptions:
[comp_node_id]
- Unique ID of the current computing node of the current cluster, specified by the associated
cluster_name
.
[num_queries]
- Number of queries processed by the current computing node.
[num_1shard_queries]
- Number of queries sent to a single backend shard.
[num_slow_queries]
- Number of slow queries.
[num_rejected_queries]
- Number of queries the computing node refused to process.
[num_illegal_queries]
- Number of illegal queries, e.g., due to access permission issues.
[num_ro_queries]
- Number of read-only queries.
[num_sent_queries]
- Total number of queries sent to backend storage shards.
[num_recv_res]
- Total volume of query results received from storage shards (in bytes).
[num_txns]
- Total number of transactions processed, including committed, aborted, 2PC or 2PC One-phase.
[num_1shard_txns]
- Number of transactions whose operations were only executed on a single storage shard.
[num_ro_txns]
- Number of read-only transactions.
[num_rb_txns]
- Number of rollback transactions.
[num_rb_txns_deadlock]
- Number of rollback transactions caused by deadlock.
[accumulated_since]
All statistics for this node have been accumulated since this timestamp.
pg_ddl_log_progress
Field descriptions:
[dbid]
- Each cluster has a row in kunlun_metadata_db.db_cluster, “dbid” refers to the primary key.
[ddl_op_id]
- Position of replaying the DDL log by the current computing node.
[max_op_id_done_local]
- Maximum position of the DDL log initially completed locally, used for distributed DDL crash safety.
pg_shard
Field descriptions:
[name]
- Storage shard name.
[id]
- Unique ID of each storage shard.
[master_node_id]
- Master node id of each storage shard.
[num_nodes]
- Number of nodes in each storage shard.
[space_volumn]
- Size of the file occupied by the table.
[num_tablets]
- Number of tablets.
[db_cluster_id]
- ID of the current cluster refers to the primary key of kunlun_metadata_db.db_cluster.
[when_created]
- Table creation time.
pg_shard_node
Field descriptions:
[id]
- Unique id of the current shard node associated with kunlun_metadata_db.shard_nodes.id.
[port]
- Port that the shard node listens on.
[shard_id]
- Unique id of the shard associated with kunlun_metadata_db.shard.id.
[svr_node_id]
- ID of the server's nested machine.
[ro_weight]
- When selecting to dispatch read-only statements to backup nodes, the shard with the highest ro_weight is chosen. Set it to 0 to disable backup node read nodes.
[hostaddr]
- IP information used for connection.
[user_name]
- Username used for connection.
[passwd]
- Password information used for connection.
[when_created]
- Creation time.