[mds] Delete mds type and rename mds table merge to mds mini merge
This commit is contained in:
@ -58,7 +58,7 @@ DAG_SCHEDULER_DAG_TYPE_DEF(DAG_TYPE_TX_TABLE_MERGE, ObDagPrio::DAG_PRIO_COMPACTI
|
||||
false, 3, {"ls_id", "tablet_id", "compaction_scn"})
|
||||
DAG_SCHEDULER_DAG_TYPE_DEF(DAG_TYPE_WRITE_CKPT, ObDagPrio::DAG_PRIO_COMPACTION_LOW, ObSysTaskType::WRITE_CKPT_TASK, "WRITE_CKPT", "COMPACTION",
|
||||
false, 2, {"ls_id", "tablet_id"})
|
||||
DAG_SCHEDULER_DAG_TYPE_DEF(DAG_TYPE_MDS_TABLE_MERGE, ObDagPrio::DAG_PRIO_COMPACTION_HIGH, ObSysTaskType::MDS_TABLE_MERGE_TASK, "MDS_TABLE_MERGE", "COMPACTION",
|
||||
DAG_SCHEDULER_DAG_TYPE_DEF(DAG_TYPE_MDS_MINI_MERGE, ObDagPrio::DAG_PRIO_COMPACTION_HIGH, ObSysTaskType::MDS_MINI_MERGE_TASK, "MDS_MINI_MERGE", "COMPACTION",
|
||||
false, 3, {"ls_id", "tablet_id", "flush_scn"})
|
||||
DAG_SCHEDULER_DAG_TYPE_DEF(DAG_TYPE_BATCH_FREEZE_TABLETS, ObDagPrio::DAG_PRIO_COMPACTION_HIGH, ObSysTaskType::BATCH_FREEZE_TABLET_TASK, "BATCH_FREEZE", "COMPACTION",
|
||||
false, 2, {"ls_id", "tablet_count"})
|
||||
|
||||
@ -37,7 +37,7 @@ const static char *ObSysTaskTypeStr[] = {
|
||||
"BACKFILL_TX",
|
||||
"REMOVE_MEMBER",
|
||||
"TRANSFER",
|
||||
"MDS_TABLE_MERGE",
|
||||
"MDS_MINI_MERGE",
|
||||
"TTL_TASK",
|
||||
"TENANT_SNAPSHOT_CREATE",
|
||||
"TENANT_SNAPSHOT_GC",
|
||||
|
||||
@ -50,7 +50,7 @@ enum ObSysTaskType
|
||||
BACKFILL_TX_TASK,
|
||||
REMOVE_MEMBER_TASK,
|
||||
TRANSFER_TASK,
|
||||
MDS_TABLE_MERGE_TASK,
|
||||
MDS_MINI_MERGE_TASK,
|
||||
TABLE_API_TTL_TASK,
|
||||
TENANT_SNAPSHOT_CREATE_TASK,
|
||||
TENANT_SNAPSHOT_GC_TASK,
|
||||
|
||||
@ -206,7 +206,7 @@ public:
|
||||
TASK_TYPE_DDL_KV_MERGE = 50,
|
||||
TASK_TYPE_TRANSFER_BACKFILL_TX = 51,
|
||||
TASK_TYPE_TRANSFER_REPLACE_TABLE = 52,
|
||||
TASK_TYPE_MDS_TABLE_MERGE = 53,
|
||||
TASK_TYPE_MDS_MINI_MERGE = 53,
|
||||
TASK_TYPE_TTL_DELETE = 54,
|
||||
TASK_TYPE_TENANT_SNAPSHOT_CREATE = 55,
|
||||
TASK_TYPE_TENANT_SNAPSHOT_GC = 56,
|
||||
@ -1390,7 +1390,7 @@ inline bool is_compaction_dag(ObDagType::ObDagTypeEnum dag_type)
|
||||
ObDagType::DAG_TYPE_MINI_MERGE == dag_type ||
|
||||
ObDagType::DAG_TYPE_MERGE_EXECUTE == dag_type ||
|
||||
ObDagType::DAG_TYPE_TX_TABLE_MERGE == dag_type ||
|
||||
ObDagType::DAG_TYPE_MDS_TABLE_MERGE == dag_type ||
|
||||
ObDagType::DAG_TYPE_MDS_MINI_MERGE == dag_type ||
|
||||
ObDagType::DAG_TYPE_BATCH_FREEZE_TABLETS == dag_type;
|
||||
}
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ int64_t ObCompactionDagStatus::to_string(char *buf, const int64_t buf_len) const
|
||||
J_OBJ_START();
|
||||
// mini
|
||||
J_TMP_STRING(ObDagType::DAG_TYPE_MINI_MERGE);
|
||||
J_TMP_STRING(ObDagType::DAG_TYPE_MDS_TABLE_MERGE);
|
||||
J_TMP_STRING(ObDagType::DAG_TYPE_MDS_MINI_MERGE);
|
||||
J_TMP_STRING(ObDagType::DAG_TYPE_TX_TABLE_MERGE);
|
||||
// minor
|
||||
J_TMP_STRING(ObDagType::DAG_TYPE_MERGE_EXECUTE);
|
||||
@ -394,7 +394,7 @@ int ObCompactionSuggestionMgr::analyze_for_suggestion(
|
||||
"suggest", ObCompactionSuggestionMgr::get_add_thread_suggestion(priority));
|
||||
if (share::ObDagPrio::DAG_PRIO_COMPACTION_HIGH == priority) {
|
||||
ADD_COMPACTION_DAG_INFO_PARAM(ObDagType::ObDagTypeEnum::DAG_TYPE_MINI_MERGE);
|
||||
ADD_COMPACTION_DAG_INFO_PARAM(ObDagType::ObDagTypeEnum::DAG_TYPE_MDS_TABLE_MERGE);
|
||||
ADD_COMPACTION_DAG_INFO_PARAM(ObDagType::ObDagTypeEnum::DAG_TYPE_MDS_MINI_MERGE);
|
||||
ADD_COMPACTION_DAG_INFO_PARAM(ObDagType::ObDagTypeEnum::DAG_TYPE_TX_TABLE_MERGE);
|
||||
} else if (share::ObDagPrio::DAG_PRIO_COMPACTION_MID == priority) {
|
||||
ADD_COMPACTION_DAG_INFO_PARAM(ObDagType::ObDagTypeEnum::DAG_TYPE_MERGE_EXECUTE);
|
||||
|
||||
@ -184,7 +184,7 @@ struct ObCompactionDagStatus final
|
||||
|
||||
DECLARE_TO_STRING;
|
||||
|
||||
// max COMPACTION mode dag is DAG_TYPE_MDS_TABLE_MERGE, which is 9
|
||||
// max COMPACTION mode dag is DAG_TYPE_MDS_MINI_MERGE, which is 9
|
||||
static const int64_t COMPACTION_DAG_MAX = 10;
|
||||
// max COMPACTION prio DAG_PRIO_COMPACTION_LOW = 4
|
||||
static const int64_t COMPACTION_PRIORITY_MAX = 5;
|
||||
|
||||
@ -26,7 +26,7 @@ const static char * ObMergeTypeStr[] = {
|
||||
"MEDIUM_MERGE",
|
||||
"DDL_KV_MERGE",
|
||||
"BACKFILL_TX_MERGE",
|
||||
"MDS_TABLE_MERGE",
|
||||
"MDS_MINI_MERGE",
|
||||
"EMPTY_MERGE_TYPE"
|
||||
};
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ enum ObMergeType
|
||||
MEDIUM_MERGE = 5,
|
||||
DDL_KV_MERGE = 6, // only use for ddl dag
|
||||
BACKFILL_TX_MERGE = 7,
|
||||
MDS_TABLE_MERGE = 8,
|
||||
MDS_MINI_MERGE = 8,
|
||||
// add new merge type here
|
||||
// fix merge_type_to_str & ObPartitionMergePolicy::get_merge_tables
|
||||
MERGE_TYPE_MAX
|
||||
@ -88,7 +88,7 @@ inline bool is_backfill_tx_merge(const ObMergeType &merge_type)
|
||||
}
|
||||
inline bool is_mds_table_merge(const ObMergeType &merge_type)
|
||||
{
|
||||
return MDS_TABLE_MERGE == merge_type;
|
||||
return MDS_MINI_MERGE == merge_type;
|
||||
}
|
||||
|
||||
enum ObMergeLevel : uint8_t
|
||||
|
||||
@ -188,7 +188,7 @@ int MdsTableBase::merge(const int64_t construct_sequence, const share::SCN &flus
|
||||
param.flush_scn_ = flushing_scn;
|
||||
param.mds_construct_sequence_ = construct_sequence;
|
||||
param.generate_ts_ = ObClockGenerator::getClock();
|
||||
param.merge_type_ = compaction::ObMergeType::MDS_TABLE_MERGE;
|
||||
param.merge_type_ = compaction::ObMergeType::MDS_MINI_MERGE;
|
||||
param.merge_version_ = 0;
|
||||
if (OB_FAIL(compaction::ObScheduleDagFunc::schedule_mds_table_merge_dag(param))) {
|
||||
if (OB_EAGAIN != ret && OB_SIZE_OVERFLOW != ret) {
|
||||
|
||||
@ -30,7 +30,7 @@ namespace storage
|
||||
namespace mds
|
||||
{
|
||||
ObMdsTableMergeDag::ObMdsTableMergeDag()
|
||||
: ObTabletMergeDag(ObDagType::DAG_TYPE_MDS_TABLE_MERGE),
|
||||
: ObTabletMergeDag(ObDagType::DAG_TYPE_MDS_MINI_MERGE),
|
||||
is_inited_(false),
|
||||
flush_scn_(),
|
||||
generate_ts_(0),
|
||||
|
||||
@ -33,7 +33,7 @@ namespace storage
|
||||
namespace mds
|
||||
{
|
||||
ObMdsTableMergeTask::ObMdsTableMergeTask()
|
||||
: ObITask(ObITaskType::TASK_TYPE_MDS_TABLE_MERGE),
|
||||
: ObITask(ObITaskType::TASK_TYPE_MDS_MINI_MERGE),
|
||||
is_inited_(false),
|
||||
mds_merge_dag_(nullptr)
|
||||
{
|
||||
@ -48,7 +48,7 @@ int ObMdsTableMergeTask::init()
|
||||
} else if (OB_ISNULL(dag_)) {
|
||||
ret = OB_ERR_SYS;
|
||||
LOG_WARN("dag must not be null", K(ret));
|
||||
} else if (OB_UNLIKELY(ObDagType::ObDagTypeEnum::DAG_TYPE_MDS_TABLE_MERGE != dag_->get_type())) {
|
||||
} else if (OB_UNLIKELY(ObDagType::ObDagTypeEnum::DAG_TYPE_MDS_MINI_MERGE != dag_->get_type())) {
|
||||
ret = OB_ERR_SYS;
|
||||
LOG_ERROR("dag type not match", K(ret), KPC_(dag));
|
||||
} else {
|
||||
|
||||
@ -74,8 +74,7 @@ const char* ObITable::table_type_name_[] =
|
||||
"DDL_MERGE_CO",
|
||||
"DDL_MERGE_CG",
|
||||
"DDL_MEM_CO",
|
||||
"DDL_MEM_CG",
|
||||
"MDS"
|
||||
"DDL_MEM_CG"
|
||||
};
|
||||
|
||||
uint64_t ObITable::TableKey::hash() const
|
||||
|
||||
@ -101,7 +101,6 @@ public:
|
||||
DDL_MERGE_CG_SSTABLE = 22, // used for column store ddl, for normal cg sstable, rowkey cg not supported
|
||||
DDL_MEM_CO_SSTABLE = 23,
|
||||
DDL_MEM_CG_SSTABLE = 24,
|
||||
MDS_SSTABLE = 25,
|
||||
// < add new sstable before here, See is_sstable()
|
||||
|
||||
MAX_TABLE_TYPE
|
||||
|
||||
@ -1112,7 +1112,7 @@ int ObTablet::init_with_update_medium_info(
|
||||
if (old_tablet.get_tablet_meta().has_next_tablet_) {
|
||||
set_next_tablet_guard(old_tablet.next_tablet_guard_);
|
||||
}
|
||||
LOG_INFO("succeeded to init tablet with update medium info", K(ret), K(this), K(old_tablet));
|
||||
LOG_INFO("succeeded to init tablet with update medium info", K(ret), KPC(this));
|
||||
is_inited_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user