[OBCDC] Fix the bug that OBCDC would exit when there is no usr_column in table schema
This commit is contained in:
parent
dcf84f95c9
commit
6978c0280b
@ -1581,10 +1581,6 @@ int ObLogFormatter::build_binlog_record_(
|
||||
} else if (OB_ISNULL(br_data = br->get_data())) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_ERROR("binlog record data is invalid", KR(ret), K(br));
|
||||
} else if (OB_ISNULL(rv->new_column_array_) || OB_ISNULL(rv->old_column_array_)) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_ERROR("invalid row value, new_column_array or old_column_array is invalid",
|
||||
K(rv->new_column_array_), K(rv->old_column_array_));
|
||||
} else if (OB_FAIL(is_hbase_mode_put_(table_id, dml_flag, rv->column_num_, new_column_cnt,
|
||||
rv->contain_old_column_, is_hbase_mode_put))) {
|
||||
LOG_ERROR("is_hbase_mode_put_ fail", KR(ret), K(table_id), K(dml_flag),
|
||||
@ -1603,6 +1599,10 @@ int ObLogFormatter::build_binlog_record_(
|
||||
"table_id", simple_table_schema->get_table_id());
|
||||
// ignore table with no columns
|
||||
br->set_is_valid(false);
|
||||
} else if (OB_ISNULL(rv->new_column_array_) || OB_ISNULL(rv->old_column_array_)) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_ERROR("invalid row value, new_column_array or old_column_array is invalid",
|
||||
K(rv->new_column_array_), K(rv->old_column_array_));
|
||||
} else {
|
||||
br_data->setNewColumn(rv->new_column_array_, static_cast<int>(rv->column_num_));
|
||||
br_data->setOldColumn(rv->old_column_array_, static_cast<int>(rv->column_num_));
|
||||
|
@ -1709,9 +1709,12 @@ int ObLogMetaManager::set_unique_keys_(ITableMeta *table_meta,
|
||||
int64_t column_count = tb_schema_info.get_usr_column_count();
|
||||
LOG_TRACE("set_unique_keys_ begin", KPC(table_schema), K(index_table_count), K(tb_schema_info));
|
||||
if (column_count < 0) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_ERROR("column_num is invalid", "table_name", table_schema->get_table_name(),
|
||||
"table_id", table_schema->get_table_id(), K(column_count));
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
} else if (0 == column_count) {
|
||||
LOG_INFO("ignore table without usr_column", "table_id", table_schema->get_table_id(),
|
||||
"table_name", table_schema->get_table_name(), K(column_count) );
|
||||
} else {
|
||||
if (index_table_count > 0) {
|
||||
int64_t is_uk_column_array_size = column_count * sizeof(bool);
|
||||
|
Loading…
x
Reference in New Issue
Block a user