tencent cloud

TDSQL Boundless

TDSTORE_TSO_STATUS

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-05-26 15:40:11

Function

TDSTORE_TSO_STATUS is used to query the running status of TSO, with each node returning one row of records.

Field Description

Field Name
Type
Description
source
varchar(64)
TSO source type.
TDSTORE: Timestamps are assigned by the TSO module within TDStore itself.
MC: Timestamps are assigned by MetaCluster.
source_address
varchar(64)
The RPC address of the TSO source.
source_node_id
bigint unsigned
The Node ID of the TSO source node. When the source is MC, this value is 0.
connection_mode
varchar(64)
Connection mode.
LOCAL: The current node is the TSO Leader and assigns timestamps locally.
REMOTE_TDSTORE: Obtains timestamps from the remote TDStore TSO Leader via RPC.
When the source is MC, this field is NULL.
lease_term
bigint
The current Raft lease term of the TSO Leader. When the source is MC, this field is NULL.
in_lease
varchar(64)
Whether it is currently within a valid lease period. When the source is MC, this field is NULL.
meta_term
bigint
The term value in the TSO persistent metadata. When the source is MC, this field is NULL.
meta_unix_timestamp_ns
bigint
The Unix timestamp (in nanoseconds) recorded in the TSO persistent metadata. When the source is MC, this field is NULL.
meta_start_from_ts
bigint unsigned
The start timestamp (start_from_ts) in the TSO persistent metadata, indicating that timestamps allocated by TSO will not be less than this value. When the source is MC, this field is NULL.
meta_enable
varchar(64)
Whether TSO is enabled. When the source is MC, this field is NULL.
sync_state
varchar(64)
TSO synchronization state.
UNINITIALIZED: Not initialized.
ENABLED: Enabled and functioning normally.
DISABLED: Disabled.
When the source is MC, this field is NULL.
last_physical_ts
bigint unsigned
The physical timestamp last allocated by TSO. When the source is MC, this field is NULL.
last_logical_ts
bigint unsigned
The logical timestamp last allocated by TSO. When the source is MC, this field is NULL.

Examples

In MC mode (default), the TSO details field is NULL:
tdsql > SELECT * FROM information_schema.TDSTORE_TSO_STATUS\\G
*************************** 1. row ***************************
source: MC
source_address: 10.10.10.10:2913
source_node_id: 0
source_replication_group_id: 0
connection_mode: NULL
lease_term: NULL
in_lease: NULL
meta_term: NULL
meta_unix_timestamp_ns: NULL
meta_start_from_ts: NULL
meta_enable: NULL
sync_state: NULL
last_physical_ts: NULL
last_logical_ts: NULL
*************************** 2. row ***************************
source: MC
source_address: 10.10.10.10:2913
source_node_id: 0
source_replication_group_id: 0
connection_mode: NULL
lease_term: NULL
in_lease: NULL
meta_term: NULL
meta_unix_timestamp_ns: NULL
meta_start_from_ts: NULL
meta_enable: NULL
sync_state: NULL
last_physical_ts: NULL
last_logical_ts: NULL
*************************** 3. row ***************************
source: MC
source_address: 10.10.10.10:2913
source_node_id: 0
source_replication_group_id: 0
connection_mode: NULL
lease_term: NULL
in_lease: NULL
meta_term: NULL
meta_unix_timestamp_ns: NULL
meta_start_from_ts: NULL
meta_enable: NULL
sync_state: NULL
last_physical_ts: NULL
last_logical_ts: NULL
3 rows in set (0.02 sec)
After switching to TDStore TSO mode is performed, you can view the TSO status of each node:

tdsql> SELECT * FROM information_schema.TDSTORE_TSO_STATUS\\G
*************************** 1. row ***************************
source: TDSTORE
source_address: 9.135.146.74:2952
source_node_id: 2
source_replication_group_id: 1792
connection_mode: REMOTE_TDSTORE
lease_term: 0
in_lease: NO
meta_term: 0
meta_unix_timestamp_ns: 0
meta_start_from_ts: 0
meta_enable: NO
sync_state: DISABLED
last_physical_ts: 0
last_logical_ts: 0
*************************** 2. row ***************************
source: TDSTORE
source_address: 9.135.146.74:2952
source_node_id: 2
source_replication_group_id: 1792
connection_mode: REMOTE_TDSTORE
lease_term: 0
in_lease: NO
meta_term: 0
meta_unix_timestamp_ns: 0
meta_start_from_ts: 0
meta_enable: NO
sync_state: UNINITIALIZED
last_physical_ts: 0
last_logical_ts: 0
*************************** 3. row ***************************
source: TDSTORE
source_address: :-1
source_node_id: 2
source_replication_group_id: 1792
connection_mode: LOCAL
lease_term: 5
in_lease: YES
meta_term: 5
meta_unix_timestamp_ns: 1773216046000000000
meta_start_from_ts: 29749624189222912
meta_enable: YES
sync_state: ENABLED
last_physical_ts: 1773216043
last_logical_ts: 16
3 rows in set (0.00 sec)

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック