fix check chksum relies on the not-sorted tablet ids.
This commit is contained in:
@ -271,7 +271,7 @@ int ObDDLChecksumOperator::get_tablet_checksum_record(
|
||||
const uint64_t execution_id,
|
||||
const uint64_t table_id,
|
||||
const int64_t ddl_task_id,
|
||||
ObIArray<ObTabletID> &tablet_ids,
|
||||
const ObIArray<ObTabletID> &tablet_ids,
|
||||
ObMySQLProxy &sql_proxy,
|
||||
common::hash::ObHashMap<uint64_t, bool> &tablet_checksum_status_map)
|
||||
{
|
||||
@ -294,7 +294,7 @@ int ObDDLChecksumOperator::get_tablet_checksum_record(
|
||||
|
||||
// check every tablet column checksum, task_id is equal to tablet_id
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < tablet_ids.count(); ++i) {
|
||||
uint64_t last_tablet_id_id = tablet_ids.at(i).id();
|
||||
const uint64_t last_tablet_id_id = tablet_ids.at(i).id();
|
||||
if (OB_FAIL(batch_tablet_array.push_back(last_tablet_id_id))) {
|
||||
LOG_WARN("fail to push back tablet_id_id", K(ret), K(tenant_id), K(execution_id), K(ddl_task_id));
|
||||
} else {
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
const uint64_t execution_id,
|
||||
const uint64_t table_id,
|
||||
const int64_t ddl_task_id,
|
||||
ObIArray<ObTabletID> &tablet_ids,
|
||||
const ObIArray<ObTabletID> &tablet_ids,
|
||||
ObMySQLProxy &sql_proxy,
|
||||
common::hash::ObHashMap<uint64_t, bool> &tablet_checksum_map);
|
||||
static int check_column_checksum(
|
||||
|
@ -408,9 +408,9 @@ int ObDDLUtil::get_tablets(
|
||||
LOG_WARN("get table schema failed", K(ret), K(tenant_id), K(table_id));
|
||||
} else if (OB_ISNULL(table_schema)) {
|
||||
ret = OB_TABLE_NOT_EXIST;
|
||||
LOG_WARN("get table schema failed", K(ret), K(table_id));
|
||||
LOG_WARN("get table schema failed", K(ret), K(tenant_id), K(table_id));
|
||||
} else if (OB_FAIL(table_schema->get_tablet_ids(tablet_ids))) {
|
||||
LOG_WARN("get tablets failed", K(ret), K(*table_schema));
|
||||
LOG_WARN("get tablets failed", K(ret), KPC(table_schema));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -2216,7 +2216,7 @@ int ObCheckTabletDataComplementOp::check_tablet_checksum_update_status(
|
||||
const uint64_t index_table_id,
|
||||
const uint64_t ddl_task_id,
|
||||
const int64_t execution_id,
|
||||
ObIArray<ObTabletID> &tablet_ids,
|
||||
const ObIArray<ObTabletID> &tablet_ids,
|
||||
bool &is_checksums_all_report)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -2336,6 +2336,7 @@ int ObCheckTabletDataComplementOp::check_finish_report_checksum(
|
||||
LOG_WARN("fail to check report checksum finished", K(ret), K(tenant_id), K(index_table_id), K(execution_id), K(ddl_task_id));
|
||||
} else if (OB_FAIL(ObDDLUtil::get_tablets(tenant_id, index_table_id, dest_tablet_ids))) {
|
||||
LOG_WARN("fail to get tablets", K(ret), K(tenant_id), K(index_table_id));
|
||||
} else if (OB_FALSE_IT(std::sort(dest_tablet_ids.begin(), dest_tablet_ids.end()))) { // sort in ASC order.
|
||||
} else if (OB_FAIL(check_tablet_checksum_update_status(tenant_id, index_table_id, ddl_task_id, execution_id, dest_tablet_ids, is_checksums_all_report))) {
|
||||
LOG_WARN("fail to check tablet checksum update status, maybe EAGAIN", K(ret), K(tenant_id), K(dest_tablet_ids), K(execution_id));
|
||||
} else if (!is_checksums_all_report) {
|
||||
|
@ -363,11 +363,6 @@ public:
|
||||
const int64_t table_id,
|
||||
int64_t &tablet_count);
|
||||
|
||||
// get all tablets of a table by table_schema
|
||||
static int get_tablets(
|
||||
const share::schema::ObTableSchema &table_schema,
|
||||
common::ObIArray<common::ObTabletID> &tablet_ids);
|
||||
|
||||
// check if the major sstable of a table are exist in all needed replicas
|
||||
static int check_major_sstable_complete(
|
||||
const uint64_t data_table_id,
|
||||
@ -673,7 +668,7 @@ private:
|
||||
const uint64_t index_table_id,
|
||||
const uint64_t ddl_task_id,
|
||||
const int64_t execution_id,
|
||||
ObIArray<ObTabletID> &tablet_ids,
|
||||
const ObIArray<ObTabletID> &tablet_ids,
|
||||
bool &tablet_checksum_status);
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user