close all tablet context when skip to build del lob task
This commit is contained in:
@ -538,43 +538,35 @@ int ObTableLoadMerger::build_del_lob_ctx(bool &need_del_lob)
|
|||||||
table_array = &empty_table_array;
|
table_array = &empty_table_array;
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
if (table_array->empty()) {
|
ObArray<ObDirectLoadMultipleSSTable *> multiple_sstable_array;
|
||||||
FLOG_INFO("LOAD NO NEED DEL LOB");
|
ObDirectLoadMultipleMergeRangeSplitter range_splitter;
|
||||||
need_del_lob = false;
|
multiple_sstable_array.set_tenant_id(MTL_ID());
|
||||||
if (OB_FAIL(store_ctx_->set_status_merged())) {
|
for (int64_t i = 0; OB_SUCC(ret) && i < table_array->count(); ++i) {
|
||||||
LOG_WARN("fail to set status", K(ret));
|
ObDirectLoadMultipleSSTable *sstable = nullptr;
|
||||||
|
if (OB_ISNULL(sstable = static_cast<ObDirectLoadMultipleSSTable *>(table_array->at(i)))) {
|
||||||
|
ret = OB_ERR_UNEXPECTED;
|
||||||
|
LOG_WARN("unexpected table", KR(ret), K(i), K(table_array));
|
||||||
|
} else if (OB_FAIL(multiple_sstable_array.push_back(sstable))) {
|
||||||
|
LOG_WARN("fail to push back sstable", KR(ret));
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
ObArray<ObDirectLoadMultipleSSTable *> multiple_sstable_array;
|
if (OB_SUCC(ret)) {
|
||||||
ObDirectLoadMultipleMergeRangeSplitter range_splitter;
|
if (OB_FAIL(range_splitter.init(multiple_sstable_array, store_ctx_->lob_id_table_data_desc_,
|
||||||
multiple_sstable_array.set_tenant_id(MTL_ID());
|
&(store_ctx_->ctx_->schema_.lob_meta_datum_utils_),
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && i < table_array->count(); ++i) {
|
store_ctx_->ctx_->schema_.lob_meta_column_descs_))) {
|
||||||
ObDirectLoadMultipleSSTable *sstable = nullptr;
|
LOG_WARN("fail to init range splitter", KR(ret));
|
||||||
if (OB_ISNULL(sstable = static_cast<ObDirectLoadMultipleSSTable *>(table_array->at(i)))) {
|
|
||||||
ret = OB_ERR_UNEXPECTED;
|
|
||||||
LOG_WARN("unexpected table", KR(ret), K(i), K(table_array));
|
|
||||||
} else if (OB_FAIL(multiple_sstable_array.push_back(sstable))) {
|
|
||||||
LOG_WARN("fail to push back sstable", KR(ret));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
}
|
||||||
if (OB_FAIL(range_splitter.init(multiple_sstable_array, store_ctx_->lob_id_table_data_desc_,
|
for (int64_t i = 0; OB_SUCC(ret) && i < tablet_merge_ctxs.count(); ++i) {
|
||||||
&(store_ctx_->ctx_->schema_.lob_meta_datum_utils_),
|
ObDirectLoadTabletMergeCtx *tablet_merge_ctx = tablet_merge_ctxs.at(i);
|
||||||
store_ctx_->ctx_->schema_.lob_meta_column_descs_))) {
|
if (OB_FAIL(tablet_merge_ctx->build_del_lob_task(
|
||||||
LOG_WARN("fail to init range splitter", KR(ret));
|
multiple_sstable_array, range_splitter, param_.session_count_))) {
|
||||||
}
|
LOG_WARN("fail to build merge task for multiple pk table", KR(ret));
|
||||||
}
|
}
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && i < tablet_merge_ctxs.count(); ++i) {
|
}
|
||||||
ObDirectLoadTabletMergeCtx *tablet_merge_ctx = tablet_merge_ctxs.at(i);
|
if (OB_SUCC(ret)) {
|
||||||
if (OB_FAIL(tablet_merge_ctx->build_del_lob_task(
|
if (OB_FAIL(del_lob_task_iter_.init(&merge_ctx_))) {
|
||||||
multiple_sstable_array, range_splitter, param_.session_count_))) {
|
LOG_WARN("fail to build del lob task", KR(ret));
|
||||||
LOG_WARN("fail to build merge task for multiple pk table", KR(ret));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (OB_SUCC(ret)) {
|
|
||||||
if (OB_FAIL(del_lob_task_iter_.init(&merge_ctx_))) {
|
|
||||||
LOG_WARN("fail to build del lob task", KR(ret));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -683,10 +683,10 @@ int ObDirectLoadMultipleMergeRangeSplitter::init(
|
|||||||
if (IS_INIT) {
|
if (IS_INIT) {
|
||||||
ret = OB_INIT_TWICE;
|
ret = OB_INIT_TWICE;
|
||||||
LOG_WARN("ObDirectLoadMultipleMergeRangeSplitter init twice", KR(ret), KP(this));
|
LOG_WARN("ObDirectLoadMultipleMergeRangeSplitter init twice", KR(ret), KP(this));
|
||||||
} else if (OB_UNLIKELY(sstable_array.empty() || !table_data_desc.is_valid() ||
|
} else if (OB_UNLIKELY(!table_data_desc.is_valid() ||
|
||||||
nullptr == datum_utils)) {
|
nullptr == datum_utils)) {
|
||||||
ret = OB_INVALID_ARGUMENT;
|
ret = OB_INVALID_ARGUMENT;
|
||||||
LOG_WARN("invalid args", KR(ret), K(sstable_array), K(table_data_desc), KP(datum_utils));
|
LOG_WARN("invalid args", KR(ret), K(table_data_desc), KP(datum_utils));
|
||||||
} else {
|
} else {
|
||||||
if (OB_FAIL(construct_rowkey_iters(sstable_array, table_data_desc, datum_utils))) {
|
if (OB_FAIL(construct_rowkey_iters(sstable_array, table_data_desc, datum_utils))) {
|
||||||
LOG_WARN("fail to construct sstable rowkey itres", KR(ret));
|
LOG_WARN("fail to construct sstable rowkey itres", KR(ret));
|
||||||
|
Reference in New Issue
Block a user