fix bug: multi-insert all_column_checksum_error_info
This commit is contained in:
@ -322,8 +322,8 @@ int ObIndexChecksumValidator::do_check(const ObSimpleFrozenStatus &frozen_status
|
|||||||
if (FAILEDx(ObTabletReplicaChecksumOperator::check_column_checksum(tenant_id_, *data_table_schema,
|
if (FAILEDx(ObTabletReplicaChecksumOperator::check_column_checksum(tenant_id_, *data_table_schema,
|
||||||
*index_table_schema, frozen_status.frozen_scn_, *sql_proxy_))) {
|
*index_table_schema, frozen_status.frozen_scn_, *sql_proxy_))) {
|
||||||
if (OB_CHECKSUM_ERROR == ret) {
|
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),
|
LOG_ERROR("ERROR! ERROR! ERROR! checksum error in index checksum", KR(ret), K_(tenant_id),
|
||||||
K_(tenant_id), K(frozen_status));
|
K(frozen_status), K(*data_table_schema), K(*index_table_schema));
|
||||||
check_ret = OB_CHECKSUM_ERROR;
|
check_ret = OB_CHECKSUM_ERROR;
|
||||||
ret = OB_SUCCESS; // continue checking next checksum
|
ret = OB_SUCCESS; // continue checking next checksum
|
||||||
} else if (OB_EAGAIN != ret) {
|
} 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));
|
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))) {
|
} 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));
|
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;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -879,14 +879,12 @@ int ObTabletReplicaChecksumOperator::check_column_checksum(
|
|||||||
if (is_global_index) {
|
if (is_global_index) {
|
||||||
if (OB_FAIL(check_global_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
|
if (OB_FAIL(check_global_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
|
||||||
global_snapshot_version, sql_proxy))) {
|
global_snapshot_version, sql_proxy))) {
|
||||||
LOG_WARN("fail to check global index column checksum", KR(ret), K(data_table_schema),
|
LOG_WARN("fail to check global index column checksum", KR(ret), K(tenant_id), K(global_snapshot_version));
|
||||||
K(index_table_schema), K(global_snapshot_version));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (OB_FAIL(check_local_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
|
if (OB_FAIL(check_local_index_column_checksum(tenant_id, data_table_schema, index_table_schema,
|
||||||
global_snapshot_version, sql_proxy))) {
|
global_snapshot_version, sql_proxy))) {
|
||||||
LOG_WARN("fail to check local index column checksum", KR(ret), K(data_table_schema),
|
LOG_WARN("fail to check local index column checksum", KR(ret), K(tenant_id), K(global_snapshot_version));
|
||||||
K(index_table_schema), K(global_snapshot_version));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user