Failure to set log restore source for standby database
Symptom
In a network-based physical standby database scenario, when setting the log restore source for the standby database, the client returns the error: set tenant itself as log restore source is not allowed.
Possible causes
To prevent users from setting the tenant itself as the restore source, when setting the log restore source for a network-based standby database or creating an empty network-based standby tenant, the cluster_id and tenant_id of the primary and standby must not both be the same; at least one must be different. Otherwise, the preceding error may occur.
How to resolve
For scenarios where the primary and standby tenants are in the same cluster, check whether the tenant information was mistakenly filled with the current tenant's information in the log restore source command.
For scenarios where the primary and standby tenants are in different clusters, in addition to checking the tenant information, check whether the
cluster_idof the clusters where the primary and standby tenants reside is the same. For OceanBase clusters deployed using OCP or obd, the system ensurescluster_iduniqueness by default. However, manually deployed OceanBase clusters may have non-uniquecluster_idvalues.