Database management
HTTPS service
For details on the HTTPS service, see HTTPS service.
View client connections
You can now use the /v1/node/connections
endpoint to view the number of client connections to that node.
The following example shows that there are 11 total connections to the node at 127.0.0.1
, 2 of which are just starting to initialize:
$ curl -sk -w "\n" --user dbadmin: "https://127.0.0.1:8443/v1/node/connections"
{
"total_connections": 11,
"user_sessions": 9,
"initializing_connections": 2
}
Drain subclusters
You can now use the /v1/subclusters/
subcluster_name
/drain
endpoint to drain connections from a subcluster. This functionality was previously limited to the SHUTDOWN_WITH_DRAIN function. To verify the draining status of your subclusters, query DRAINING_STATUS.
To drain the connections from a subcluster, you can send a POST request with one of the following:
- An empty body
{"cancel": false}
For example:
$ curl -i -X POST -d '{"cancel": false}' -ks -w "\n" --user dbadmin: https://127.0.0.1:8443/v1/subclusters/sc_01/drain
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 43
Connection: keep-alive
Server: oatpp/1.3.0
To stop draining connections, send a POST request with {"cancel": true}
. For example:
$ curl -i -X POST -d '{"cancel": true}' -ks -w "\n" --user dbadmin: https://127.0.0.1:8443/v1/subclusters/sc_01/drain
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 47
Connection: keep-alive
Server: oatpp/1.3.0
View subscription states
The new /v1/subscriptions
endpoint returns information on a node's subscriptions to shards:
node_name
shard_name
: The shard the node is subscribed tosubscription_state
: Subscription status (ACTIVE
,PENDING
,PASSIVE
, orREMOVING
)is_primary
: Whether the subscription is a primary subscription
For example:
$ curl -i -sk -w "\n" --user dbadmin:my_password "https://127.0.0.1:8443/v1/subscriptions"
{
"subscriptions_list":
[
{
"node_name": "node08",
"shard_name": "segment0004",
"subscription_state": "ACTIVE",
"is_primary": false
},
...
]
}
Depot and data paths
The following storage locations fields have been added to the /v1/nodes
and /v1/nodes/
node_name
endpoints:
data_path
: A list of paths used to store USAGE 'DATA,TEMP' data.depot_path
: The path used to store USAGE 'DEPOT' data.
For example:
$ curl -i -sk --user dbadmin:my_password https://127.0.0.1:8443/v1/nodes
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 648
Connection: keep-alive
Server: oatpp/1.3.0
{
"detail": null,
"node_list": [
{
"name": "v_vmart_node0001",
"node_id": 45035996273704982,
"address": "192.0.2.0",
"state": "UP",
"database": "VMart",
"is_primary": true,
"is_readonly": false,
"catalog_path": "\/scratch_b\/VMart\/v_vmart_node0001_catalog\/Catalog",
"data_path": [
"\/scratch_b\/VMart\/v_vmart_node0001_data"
],
"depot_path": "\/scratch_b\/VMart/my_depot",
"subcluster_name": "",
"last_msg_from_node_at": "2023-12-01T12:38:37.009443",
"down_since": null,
"build_info": "v24.1.0-20231126-36ee8c3de77d43c6ad7bbef252302977952ac9d6"
}
]
}
$ curl -i -sk --user dbadmin:my_password https://127.0.0.1:8443/v1/nodes/v_vmart_node0001/
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 648
Connection: keep-alive
Server: oatpp/1.3.0
{
"detail": null,
"node_list": [
{
"name": "v_vmart_node0001",
"node_id": 45035996273704982,
"address": "192.0.2.0",
"state": "UP",
"database": "VMart",
"is_primary": true,
"is_readonly": false,
"catalog_path": "\/scratch_b\/VMart\/v_vmart_node0001_catalog\/Catalog",
"data_path": [
"\/scratch_b\/VMart\/v_vmart_node0001_data"
],
"depot_path": "\/scratch_b\/VMart/my_depot",
"subcluster_name": "",
"last_msg_from_node_at": "2023-12-01T12:38:37.009443",
"down_since": null,
"build_info": "v24.1.0-20231126-36ee8c3de77d43c6ad7bbef252302977952ac9d6"
}
]
}