Note
- Due to the storage architecture optimization of OceanBase Database V4.x, this view has been deprecated since OceanBase Database V4.0.0.
- In OceanBase Database V4.x, you can query the V$OB_MEMSTORE or V$OB_MEMSTORE_INFO view for MemTables.
Purpose
The v$tenant_memstore_allocator_info view displays some information about the MemTables on the connected OBServer node. You can use this view to troubleshoot the problem that the MemStore memory of a tenant no longer in use is not released. Each row contains the information about one 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 number of the OBServer node. |
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| TABLE_ID | bigint(20) | NO | The ID of the table. |
| PARTITION_ID | bigint(20) | NO | The ID of the partition. |
| MT_BASE_VERSION | bigint(20) | NO | The base transaction version corresponding to the MemTable. |
| RETIRE_CLOCK | bigint(20) | NO | The size in bytes of memory that has been allocated to the MemStore of the tenant to which the MemTable belongs. |
| MT_IS_FROZEN | bigint(20) | NO | Indicates whether the MemTable is frozen. |
| MT_PROTECTION_CLOCK | bigint(20) | NO | The size in bytes of memory already allocated to the MemStore of the tenant when memory was allocated to the MemTable for the first time. |
| MT_SNAPSHOT_VERSION | bigint(20) | NO | The snapshot version of the MemTable. |
Sample query
Query the MemTables on the OBServer nodes of all tenants in the cluster, and specify to return the first five records.
obclient [oceanbase]> SELECT * FROM oceanbase.v$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