Skip to main content
Last updated on

TSO Action

SinceVersion dev

Description​

Returns a snapshot of TSO state without allocating a timestamp or incrementing the logical counter. Valid Doris user authentication is required. A non-master FE forwards the request to the Master FE by default; local=true returns the receiving FE's local state. See TSO for prerequisites.

Request​

GET /api/tso

Parameters​

ParameterTypeRequiredDefaultDescription
localbooleanNofalseWhen true, skips master forwarding and queries the receiving FE's local state.

There are no path parameters or request body.

Example​

Using the default HTTP port, prompt for the password:

curl --user root http://127.0.0.1:8030/api/tso

Illustrative response (timestamps depend on the running cluster):

{
"code": 0,
"msg": "success",
"data": {
"window_end_physical_time": 1625097601000,
"current_tso": 426009585254400123,
"current_tso_physical_time": 1625097600000,
"current_tso_logical_counter": 123
}
}

Response fields​

FieldTypeDescription
window_end_physical_timelongReserved allocation-window boundary, in Unix milliseconds.
current_tsolongCurrent composed 64-bit allocation cursor.
current_tso_physical_timelongPhysical component of current_tso, in milliseconds.
current_tso_logical_counterlongLogical counter component of current_tso.

Errors and caveats​

Authentication failure, an unready FE, or forwarding failure can prevent a successful response. An uninitialized local service may return zero values; a snapshot does not guarantee subsequent allocations will succeed. Only the active master allocates TSOs, but any ready FE can receive status requests. The window boundary normally leads the current physical component because it reserves a future allocation window.