【 使用环境 】生产环境
【 OB or 其他组件 】ocp
【 使用版本 】OCP版本号: 4.3.4-20250114101305,OB版本4.2.2
【问题描述】创建备租户任务报错
【复现路径】创建备租户
【附件及日志】
subtask_11029141.log (26.3 KB)
错误码
OBE10002
错误信息
操作OceanBase失败,错误信息: (conn=3221818514) Unknown column ‘recover_scn_display’ in ‘field list’ If column exists but type cannot be identified (example ‘select ? field1
from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1
from dual’)
错误原因
连接 sys 执行 select * from (SELECT job_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display AS restore_finish_timestamp, IF(recover_scn_display != ‘’, recover_scn_display, NULL) AS restore_current_timestamp, start_timestamp AS start_time, finish_timestamp AS completion_time, restore_progress AS data_restore_progress, recover_progress AS log_restore_progress, status, comment AS error_msg, description FROM ( SELECT job_id, tenant_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display, recover_scn_display, start_timestamp, NULL AS finish_timestamp, status, restore_progress, recover_progress, NULL AS comment, description FROM CDB_OB_RESTORE_PROGRESS UNION SELECT job_id, tenant_id, backup_cluster_name, backup_tenant_name, backup_tenant_id, backup_dest, restore_tenant_name, restore_tenant_id, restore_option, restore_scn_display, NULL as recover_scn_display, start_timestamp, finish_timestamp, status, NULL AS restore_progress, NULL AS recover_progress, comment, description FROM CDB_OB_RESTORE_HISTORY ) RIGHT JOIN (SELECT job_id AS _job_id, max(tenant_id) as _tenant_id FROM ( SELECT job_id, tenant_id FROM CDB_OB_RESTORE_PROGRESS UNION SELECT job_id, tenant_id FROM CDB_OB_RESTORE_HISTORY ) GROUP BY _job_id ) AS t ON job_id = t._job_id AND tenant_id = t._tenant_id WHERE description = ? ORDER BY start_time DESC) where restore_tenant_name = ‘mytenant’ 失败,错误信息: (conn=3221818514) Unknown column ‘recover_scn_display’ in ‘field list’ If column exists but type cannot be identified (example ‘select ? field1
from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1
from dual’)
2025-01-16 10:17:18.456 ERROR 1432603 — [manual-subtask-executor13,370c0d6e3f0229b8,746af3a226d1fdca] c.o.o.c.t.e.c.w.subtask.SubtaskExecutor : Unknown column ‘recover_scn_display’ in ‘field list’
If column exists but type cannot be identified (example ‘select ? field1
from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1
from dual’)
java.sql.SQLException: Unknown column ‘recover_scn_display’ in ‘field list’
If column exists but type cannot be identified (example ‘select ? field1
from dual’). Use CAST function to solve this problem (example ‘select CAST(? as integer) field1
from dual’)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:2364)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:2229)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:2117)
at com.oceanbase.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:399)
at com.oceanbase.jdbc.JDBC4PreparedStatement.executeInternal(JDBC4PreparedStatement.java:248)
at com.oceanbase.jdbc.JDBC4PreparedStatement.execute(JDBC4PreparedStatement.java:171)
at com.oceanbase.jdbc.JDBC4PreparedStatement.executeQuery(JDBC4PreparedStatement.java:185)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:724)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:650)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:715)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:746)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:759)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:812)
at com.oceanbase.ocp.obsdk.connector.ConnectTemplate.query(ConnectTemplate.java:91)
at com.oceanbase.ocp.bac
kup.internal.obsdk.ObBackupConnectTemplate.query(ObBackupConnectTemplate.java:50)
at com.oceanbase.backup.core.obsdk.operator.MysqlPhysicalAdvancedBackupOperator.listRestoreTasks(MysqlPhysicalAdvancedBackupOperator.java:693)
at com.oceanbase.ocp.service.task.business.tenant.WaitRestoreStandbyTenantSuccessTask.lambda$run$0(WaitRestoreStandbyTenantSuccessTask.java:67)
at com.oceanbase.ocp.common.lang.pattern.Retry.executeUntilWithLimit(Retry.java:82)
at com.oceanbase.ocp.common.lang.pattern.Retry.executeUntilWithLimit(Retry.java:61)
at com.oceanbase.ocp.service.task.business.tenant.WaitRestoreStandbyTenantSuccessTask.run(WaitRestoreStandbyTenantSuccessTask.java:63)
at com.oceanbase.ocp.core.task.runtime.Subtask.retry(Subtask.java:49)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.retry(JavaSubtaskRunner.java:76)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.doRun(JavaSubtaskRunner.java:35)
at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.run(JavaSubtaskRunner.java:26)
at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.doRun(RunnerFactory.java:76)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.doRun(SubtaskExecutor.java:206)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.redirectConsoleOutput(SubtaskExecutor.java:200)
at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.lambda$submit$2(SubtaskExecutor.java:137)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Set state for subtask: 11029141, operation:RETRY, state: FAILED