Note
- Due to the optimization of the storage architecture in V4.x, this view is removed starting from V4.0.0.
- In V4.x, you can query the GV$OB_MEMSTORE and GV$OB_MEMSTORE_INFO views to obtain information about MemTables.
Purpose
The gv$tenant_memstore_allocator_info view displays information about MemTables on the OBServer node to which you are connected. This view is used to troubleshoot the issue where the memory of a tenant's MemStore is not released for a long time. Each row of the view corresponds to the information of a MemTable.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SVR_IP | varchar(32) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port of the OBServer node. |
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| TABLE_ID | bigint(20) | NO | The table ID. |
| PARTITION_ID | bigint(20) | NO | The partition ID. |
| MT_BASE_VERSION | bigint(20) | NO | The starting transaction version of the MemTable. |
| RETIRE_CLOCK | bigint(20) | NO | The total memory allocated to the MemStore of the tenant to which the MemTable belongs, in bytes. |
| MT_IS_FROZEN | bigint(20) | NO | Indicates whether the MemTable is frozen. |
| MT_PROTECTION_CLOCK | bigint(20) | NO | The memory allocated to the MemStore of the tenant to which the MemTable belongs when the MemTable was first allocated memory, in bytes. |
| MT_SNAPSHOT_VERSION | bigint(20) | NO | The snapshot version of the MemTable. |
Sample query
Query the information about MemTables on the OBServer nodes of all tenants in the cluster and display the first five records.
obclient [oceanbase]> SELECT * FROM oceanbase.gv$tenant_memstore_allocator_info LIMIT 5;
The query result is as follows:
+----------------+----------+-----------+---------------+--------------+------------------+--------------+--------------+---------------------+---------------------+
| SVR_IP | SVR_PORT | TENANT_ID | TABLE_ID | PARTITION_ID | MT_BASE_VERSION | RETIRE_CLOCK | MT_IS_FROZEN | MT_PROTECTION_CLOCK | MT_SNAPSHOT_VERSION |
+----------------+----------+-----------+---------------+--------------+------------------+--------------+--------------+---------------------+---------------------+
| 11.xxx.xxx.xxx | 28823 | 1 | 1099511627777 | 0 | 1714097130079840 | 11335106560 | 0 | 11297357824 | 9223372036854775807 |
| 11.xxx.xxx.xxx | 28823 | 1 | 1099511627778 | 0 | 1714097129965420 | 11335106560 | 0 | 11316232192 | 9223372036854775807 |
| 11.xxx.xxx.xxx | 28823 | 1 | 1099511627779 | 0 | 1714097129965420 | 11335106560 | 0 | 9223372036854775807 | 9223372036854775807 |
| 11.xxx.xxx.xxx | 28823 | 1 | 1099511627779 | 1 | 1714097129966498 | 11335106560 | 0 | 9223372036854775807 | 9223372036854775807 |
| 11.xxx.xxx.xxx | 28823 | 1 | 1099511627779 | 2 | 1714097129967561 | 11335106560 | 0 | 9223372036854775807 | 9223372036854775807 |
+----------------+----------+-----------+---------------+--------------+------------------+--------------+--------------+---------------------+---------------------+
5 rows in set
