fix direct load build heap table multiple merge task
This commit is contained in:
@ -634,38 +634,37 @@ int ObDirectLoadTabletMergeCtx::build_heap_table_multiple_merge_task(
|
|||||||
merge_task = nullptr;
|
merge_task = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
}
|
||||||
// for imported data, construct task by multiple heap table
|
if (OB_SUCC(ret)) {
|
||||||
for (int64_t i = 0; OB_SUCC(ret) && !param_.is_fast_heap_table_ && i < multiple_heap_table_array_.count(); ++i) {
|
// for imported data, construct task by multiple heap table
|
||||||
ObDirectLoadMultipleHeapTable *heap_table = multiple_heap_table_array_.at(i);
|
for (int64_t i = 0; OB_SUCC(ret) && !param_.is_fast_heap_table_ && i < multiple_heap_table_array_.count(); ++i) {
|
||||||
ObDirectLoadPartitionHeapTableMultipleMergeTask *merge_task = nullptr;
|
ObDirectLoadMultipleHeapTable *heap_table = multiple_heap_table_array_.at(i);
|
||||||
int64_t row_count = 0;
|
ObDirectLoadPartitionHeapTableMultipleMergeTask *merge_task = nullptr;
|
||||||
ObTabletCacheInterval pk_interval;
|
int64_t row_count = 0;
|
||||||
if (OB_FAIL(heap_table->get_tablet_row_count(tablet_id_, param_.table_data_desc_, row_count))) {
|
ObTabletCacheInterval pk_interval;
|
||||||
LOG_WARN("fail to get tablet row count", KR(ret), K(tablet_id_));
|
if (OB_FAIL(heap_table->get_tablet_row_count(tablet_id_, param_.table_data_desc_, row_count))) {
|
||||||
} else if (0 == row_count) {
|
LOG_WARN("fail to get tablet row count", KR(ret), K(tablet_id_));
|
||||||
// ignore
|
} else if (0 == row_count) {
|
||||||
} else if (OB_FAIL(get_autoincrement_value(row_count, pk_interval))) {
|
// ignore
|
||||||
LOG_WARN("fail to get autoincrement value", KR(ret), K(row_count));
|
} else if (OB_FAIL(get_autoincrement_value(row_count, pk_interval))) {
|
||||||
} else if (OB_ISNULL(merge_task = OB_NEWx(ObDirectLoadPartitionHeapTableMultipleMergeTask, (&allocator_)))) {
|
LOG_WARN("fail to get autoincrement value", KR(ret), K(row_count));
|
||||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
} else if (OB_ISNULL(merge_task = OB_NEWx(ObDirectLoadPartitionHeapTableMultipleMergeTask, (&allocator_)))) {
|
||||||
LOG_WARN("fail to new ObDirectLoadPartitionHeapTableMultipleMergeTask", KR(ret));
|
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||||
} else if (OB_FAIL(merge_task->init(ctx_, param_, this, heap_table, pk_interval, parallel_idx++))) {
|
LOG_WARN("fail to new ObDirectLoadPartitionHeapTableMultipleMergeTask", KR(ret));
|
||||||
LOG_WARN("fail to init merge task", KR(ret));
|
} else if (OB_FAIL(merge_task->init(ctx_, param_, this, heap_table, pk_interval, parallel_idx++))) {
|
||||||
} else if (OB_FAIL(task_array_.push_back(merge_task))) {
|
LOG_WARN("fail to init merge task", KR(ret));
|
||||||
LOG_WARN("fail to push back merge task", KR(ret));
|
} else if (OB_FAIL(task_array_.push_back(merge_task))) {
|
||||||
}
|
LOG_WARN("fail to push back merge task", KR(ret));
|
||||||
if (OB_FAIL(ret)) {
|
}
|
||||||
if (nullptr != merge_task) {
|
if (OB_FAIL(ret)) {
|
||||||
merge_task->~ObDirectLoadPartitionHeapTableMultipleMergeTask();
|
if (nullptr != merge_task) {
|
||||||
allocator_.free(merge_task);
|
merge_task->~ObDirectLoadPartitionHeapTableMultipleMergeTask();
|
||||||
merge_task = nullptr;
|
allocator_.free(merge_task);
|
||||||
}
|
merge_task = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user