提交 0d375623 编写于 作者: O obdev 提交者: wangzelin.wzl

fix bug: multi-insert all_column_checksum_error_info

上级 3c66d1a9
......@@ -322,8 +322,8 @@ int ObIndexChecksumValidator::do_check(const ObSimpleFrozenStatus &frozen_status
if (FAILEDx(ObTabletReplicaChecksumOperator::check_column_checksum(tenant_id_, *data_table_schema,
*index_table_schema, frozen_status.frozen_scn_, *sql_proxy_))) {
if (OB_CHECKSUM_ERROR == ret) {
LOG_ERROR("ERROR! ERROR! ERROR! checksum error in index checksum", KR(ret), K(*data_table_schema), K(*index_table_schema),
K_(tenant_id), K(frozen_status));
LOG_ERROR("ERROR! ERROR! ERROR! checksum error in index checksum", KR(ret), K_(tenant_id),
K(frozen_status), K(*data_table_schema), K(*index_table_schema));
check_ret = OB_CHECKSUM_ERROR;
ret = OB_SUCCESS; // continue checking next checksum
} else if (OB_EAGAIN != ret) {
......
......@@ -631,7 +631,6 @@ int ObMajorMergeScheduler::update_merge_status(const int64_t expected_epoch)
}
}
}
}
}
}
......
......@@ -87,9 +87,12 @@ int ObColumnChecksumErrorOperator::insert_column_checksum_err_info_(
LOG_WARN("fail to add pk column", KR(ret), K(tenant_id), K(info));
} else if (OB_FAIL(exec.exec_insert_update(OB_ALL_COLUMN_CHECKSUM_ERROR_INFO_TNAME, dml, affected_rows))) {
LOG_WARN("fail to splice exec_insert_update", KR(ret), K(meta_tenant_id), K(info));
} else if (!is_single_row(affected_rows)) {
} else if (affected_rows < 0 || affected_rows > 2) {
// one ckm_error info may insert multi-times due to verifying checksum multi-times. if re-insert, cuz we
// use 'on duplicate key update', the 'affected_rows' may be 0(not pk_column values unchanged)
// or 2(not pk_column values changed)
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("unexpected affected rows", KR(ret), K(affected_rows), K(meta_tenant_id), K(info));
LOG_WARN("unexpected affected rows", KR(ret), K(affected_rows));
}
return ret;
}
......
......@@ -879,14 +879,12 @@ int ObTabletReplicaChecksumOperator::check_column_checksum(
if (is_global_index) {
if (OB_FAIL(check_global_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
global_snapshot_version, sql_proxy))) {
LOG_WARN("fail to check global index column checksum", KR(ret), K(data_table_schema),
K(index_table_schema), K(global_snapshot_version));
LOG_WARN("fail to check global index column checksum", KR(ret), K(tenant_id), K(global_snapshot_version));
}
} else {
if (OB_FAIL(check_local_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
global_snapshot_version, sql_proxy))) {
LOG_WARN("fail to check local index column checksum", KR(ret), K(data_table_schema),
K(index_table_schema), K(global_snapshot_version));
LOG_WARN("fail to check local index column checksum", KR(ret), K(tenant_id), K(global_snapshot_version));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册