fix storage schema version check

This commit is contained in:
fforkboat 2024-10-24 03:47:54 +00:00 committed by ob-robot
parent c942ba1db8
commit 9200686f45
2 changed files with 12 additions and 1 deletions

View File

@ -1104,7 +1104,7 @@ int ObMediumCompactionScheduleFunc::get_table_schema_to_merge(
bool is_cs_replica = false;
int64_t storage_schema_version = ObStorageSchema::STORAGE_SCHEMA_VERSION_LATEST;
if (data_version < DATA_VERSION_4_3_3_0) {
if (data_version < DATA_VERSION_4_3_4_0) {
storage_schema_version = ObStorageSchema::STORAGE_SCHEMA_VERSION_V3;
} else {
storage_schema_version = ObStorageSchema::STORAGE_SCHEMA_VERSION_V4;

View File

@ -245,6 +245,17 @@ int ObScheduleTabletFunc::get_schedule_execute_info(
// TODO replace with new func on tablet later @lana
LOG_WARN("failed to load storage schema", K(ret), K(tablet));
} else if (FALSE_IT(is_mv_major_refresh_tablet = storage_schema->is_mv_major_refresh())) {
} else if (is_mv_major_refresh_tablet &&
ObBasicMergeScheduler::INIT_COMPACTION_SCN == last_major_snapshot) {
int tmp_ret = OB_SUCCESS;
if (OB_TMP_FAIL(ADD_SUSPECT_INFO(MEDIUM_MERGE, share::ObDiagnoseTabletType::TYPE_MEDIUM_MERGE,
ls_id, tablet_id, ObSuspectInfoType::SUSPECT_MV_IN_CREATION,
last_major_snapshot,
static_cast<int64_t>(tablet.is_row_store())))) {
LOG_WARN("failed to add suspect info", K(tmp_ret));
}
LOG_INFO("mv creation has not finished, can not schedule mv tablet", K(ret),
K(last_major_snapshot));
} else if (OB_FAIL(tablet_status_.medium_list()->get_next_schedule_info(
last_major_snapshot, merge_version_, is_mv_major_refresh_tablet, compaction_type, schedule_scn))) {
if (OB_NO_NEED_MERGE != ret) {