Overview
ob_org_cluster_id is used to set the cluster_id at the session level for OceanBase AI Database. This value is persisted in transaction logs.
Privilege requirements
Query variables
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.Modify variables
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | int |
| Default Value | 0 indicates to use the cluster's own.cluster_id, which is the unique identifier generated when the cluster is created. |
| Value range | [0, 4294967295] |
| Effective Scope | Session |
| Modifiable | Yes, you can use the following methods:SETStatement modification. |
Usage instructions
Typically, you do not need to set the ob_org_cluster_id variable, as OceanBase AI Database uses a default value when generating logs (clogs). OMS can implement data filtering functionality through the ob_org_cluster_id variable. For detailed information and configuration on the OMS data filtering feature, see Create a data migration project for migrating from MySQL to an OceanBase AI Database user tenant in OceanBase Migration Service.
For example, if the OMS obcdc component has a cluster_id blacklist set to cluster_id_black_list=2147473648, and the session variable SET ob_org_cluster_id=2147473648; is set during write operations on the OBServer node. Then, after receiving the data, obcdc will filter out all data where cluster_id equals 2147473648.
Configuration example
Set the cluster_id at the session level of OceanBase AI Database to 2147473648.
obclient> SET ob_org_cluster_id = 2147473648;