modify obarray to fixed array

This commit is contained in:
sdc
2023-07-27 05:42:24 +00:00
committed by ob-robot
parent a56aaf6376
commit e5fd09875c
2 changed files with 3 additions and 2 deletions

View File

@ -876,7 +876,7 @@ int ObSlaveMapPkeyRangeIdxCalc::build_partition_range_channel_map(
PartitionRangeChannelInfo *item = nullptr;
if (OB_ISNULL(buf = exec_ctx_.get_allocator().alloc(sizeof(PartitionRangeChannelInfo)))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
} else if (FALSE_IT(item = new (buf) PartitionRangeChannelInfo)) {
} else if (FALSE_IT(item = new (buf) PartitionRangeChannelInfo(exec_ctx_.get_allocator()))) {
} else if (FALSE_IT(item->tablet_id_ = tmp_tablet_id)) {
} else if (OB_FAIL(item->channels_.assign(tmp_channels))) {
LOG_WARN("assign partition channels failed", K(ret));

View File

@ -819,9 +819,10 @@ public:
private:
struct PartitionRangeChannelInfo
{
PartitionRangeChannelInfo(common::ObIAllocator &allocator) : channels_(allocator) { }
int64_t tablet_id_;
ObPxTabletRange::RangeCut range_cut_;
common::ObArray<int64_t> channels_;
common::ObFixedArray<int64_t, common::ObIAllocator> channels_;
TO_STRING_KV(K(tablet_id_), K(range_cut_), K(channels_));
};