説明
このビューはV4.3.4バージョンから導入され、主にOBKV-Tableクライアントに適用されます。
機能の概要
MySQLテナントでは、ビューV$OB_KV_CLIENT_INFOを使用して、現在のノード上のOBKVテナントクライアント接続の設定パラメータ情報にアクセスできます。
フィールド説明
フィールド名 |
型 |
NULL許容 |
説明 |
|---|---|---|---|
| client_id | bigint | NO | クライアントID |
| client_ip | varchar:MAX_IP_ADDR_LENGTH | NO | クライアントIPアドレス |
| client_port | bigint | NO | クライアントポート |
| svr_ip | varchar:MAX_IP_ADDR_LENGTH | NO | 所在サーバーのIPアドレス |
| svr_port | bigint | NO | 所在サーバーのポート番号 |
| tenant_id | bigint | NO | テナントID |
| user_name | varchar::OB_MAX_USER_NAME_LENGTH | NO | ユーザー名 |
| first_login_ts | timestamp(6) | NO | 最初ログイン日時 |
| last_login_ts | timestamp(6) | NO | 前回ログイン日時 |
| client_info | varchar:2048 | NO | クライアント情報のJSON文字列 |
client_info フィールドのJSON文字列形式は次のとおりです:
{
"client_id": 242153145,
"runtime": {
"rpc.execute.timeout": "3000",
"rpc.operation.timeout": "10000",
"runtime.max.wait": "3000",
"runtime.retry.interval": "1",
"runtime.retry.times": "1",
"connection.max.expired.time": "8"
},
"log": {
"slow.query.monitor.threshold": "10"
},
"route": {
"metadata.refresh.interval": "60000",
"continuous.failure.ceiling": "100",
"server.address.caching.timeout": "3600000",
"server.address.priority.timeout": "1800000",
"table.entry.acquire.connect.timeout": "500",
"table.entry.acquire.socket.timeout": "3000",
"table.entry.refresh.interval.base": "100",
"table.entry.refresh.interval.ceiling": "1600",
"table.entry.refresh.try.times": "3"
},
"thread_pool": {
"runtime.batch.executor": "false"
}
}
JSONフィールド内のパラメータ説明は以下のとおりです:
パラメータ |
デフォルト値 |
説明 |
|---|---|---|
| metadata.refresh.interval | 60000 | METADATAのリフレッシュ時間間隔。 |
| rpc.execute.timeout | 3000 | RPCリクエストのソケットタイムアウト時間。 |
| rpc.operation.timeout | 10000 | OceanBase内部でのRPCリクエスト実行タイムアウト時間。 |
| runtime.continuous_failure.ceiling | 100 | 連続実行失敗の上限。この値に達すると、TABLEのアドレスがリフレッシュされます。 |
| runtime.max.wait | 3000 | 単一実行のタイムアウト時間内でのリトライ回数。 |
| runtime.retry.interval | 1 | 実行エラー発生時のリトライ時間間隔。 |
| runtime.retry.times | 1 | 実行中に再試行可能なエラーが発生した場合のリトライ回数。 |
| server.address.caching.timeout | 3600000L | SERVERアドレスキャッシュの有効期限。 |
| server.address.priority.timeout | 1800000L | SERVERアドレス優先順位の有効期限。 |
| slow.query.monitor.threshold | 10 | MONITORログに記録されるスロー操作の実行時間しきい値。 |
| table.entry.acquire.connect.timeout | 500 | TABLEアドレスリフレッシュ接続要求のタイムアウト時間。 |
| table.entry.acquire.socket.timeout | 3000 | TABLEアドレスのソケットタイムアウト時間。 |
| table.entry.refresh.interval.base | 100 | TABLEアドレスリフレッシュの基本時間間隔。 |
| table.entry.refresh.interval.ceiling | 1600 | TABLEアドレスリフレッシュの最大時間間隔。 |
| table.entry.refresh.try.times | 3 | TABLEアドレスリフレッシュの試行回数。 |
| runtime.batch_executor | false | バッチリクエスト時の並列実行スレッドプール |
| connection.max.expired.time | 8s | クライアント接続のリフレッシュおよび再ログインまでの最大時間間隔 |
クエリ例
MySQLテナントでビューV$OB_KV_CLIENT_INFOをクエリするステートメントは次のとおりです:
obclient [mysql]> SELECT * FROM oceanbase.V$OB_KV_CLIENT_INFO LIMIT 1;
実行結果の例は次のとおりです:
+---------------------+--------------+-------------+--------------+----------+-----------+-----------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| CLIENT_ID | CLIENT_IP | CLIENT_PORT | SVR_IP | SVR_PORT | TENANT_ID | USER_NAME | FIRST_LOGIN_TS | LAST_LOGIN_TS | CLIENT_INFO |
+---------------------+--------------+-------------+--------------+----------+-----------+-----------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 7409156147904779098 | xx.xx.xx.xx | 46318 | xx.xx.xx.xx | 2882 | 1010 | ots_user | 2026-02-11 15:47:51.336915 | 2026-02-11 16:03:51.344704 | {"route":{"metadata.refresh.interval":"60000","table.entry.refresh.try.times":"3","table.entry.acquire.socket.timeout":"3000","runtime.continuous.failure.ceiling":"100","server.address.priority.timeout":"1800000","server.address.caching.timeout":"3600000","table.entry.refresh.interval.ceiling":"1600","table.entry.acquire.connect.timeout":"500","table.entry.refresh.interval.base":"100"},"log":{"slow.query.monitor.threshold":"-1"},"thread_pool":{"runtime.batch.executor":false},"runtime":{"runtime.retry.times":"3","runtime.retry.interval":"100","rpc.execute.timeout":"15000","rpc.operation.timeout":"10000","runtime.max.wait":"20000","connection.max.expired.time":"8"},"client_id":7409156147904779098} |
+---------------------+--------------+-------------+--------------+----------+-----------+-----------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set