---
title: "合并报错，日志有 obj1 and obj2 can&#x27;t compare 的错误-OceanBase数据库使用指南"
description: "了解OceanBase数据库在实际应用中关于合并报错，日志有 obj1 and obj2 can&#x27;t compare 的错误相关的常见问题和使用技巧，帮助您快速解决合并报错，日志有 obj1 and obj2 can&#x27;t compare 的错误的难题。"
---
切换语言

- 简体中文
- English

划线反馈

# 合并报错，日志有 obj1 and obj2 can't compare 的错误

更新时间：2026-06-15 09:16

适用版本： V3.1.x、V3.2.x 内容类型：Troubleshoot  

## 适用版本

OceanBase 数据库 V3.x 版本。

## 问题描述

OceanBase 数据库合并异常，`observer.log` 中有以下日志信息。

```shell
[2023-08-07 10:30:34.150054] WARN  [COMMON] compare (ob_obj_compare.cpp:3500) [2310751][0][YB420xxxxxxx-000600xxxxxxxxxx-0-0] [lt=12] [dc=0] obj1 and obj2 can't compare(obj1={"VARCHAR":"9a58fd6331acxxxxxxxxxxxxxxxxxxxx", collation:"utf8mb4_bin", coercibility:"IMPLICIT"}, obj2={"VARCHAR":"9a58fd6331acxxxxxxxxxxxxxxxxxxxx", collation:"utf8mb4_general_ci", coercibility:"IMPLICIT"}, obj1.get_meta()={type:"VARCHAR", collation:"utf8mb4_bin", coercibility:"IMPLICIT"}, obj2.get_meta()={type:"VARCHAR", collation:"utf8mb4_general_ci", coercibility:"IMPLICIT"})

```

## 问题原因

具体原因未知。但根据日志信息，是合并时的多个版本的数据的 collation 不一致，如以下日志所示。

```shell
obj1={"VARCHAR":"9a58fd6331acxxxxxxxxxxxxxxxxxxxx", collation:"utf8mb4_bin", coercibility:"IMPLICIT"}, obj2={"VARCHAR":"9a58fd6331acxxxxxxxxxxxxxxxxxxxx", collation:"utf8mb4_general_ci", coercibility:"IMPLICIT"}, obj1.get_meta()={type:"VARCHAR", collation:"utf8mb4_bin", coercibility:"IMPLICIT"}, obj2.get_meta()={type:"VARCHAR", collation:"utf8mb4_general_ci"

```

## 解决方法

需要重建副本，方式如下：

1. 通过逻辑备份方式，备份异常副本数据。
 2. 删除异常副本。
 3. 重建异常副本 Schema，重新导入备份数据。

Previous

[合并报错 column checksum is not equal](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000209920)

Next

[各个 Zone 合并完成变为 idle 状态后，集群的合并状态依然为 merging](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000267190) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
