fix ObOptColumnStat serialize bug

This commit is contained in:
wangt1xiuyi
2023-09-21 02:40:16 +00:00
committed by ob-robot
parent 63af0e6566
commit d269ccd448
9 changed files with 38 additions and 20 deletions

View File

@ -45,7 +45,7 @@ OB_DEF_DESERIALIZE(ObOptStatsGatherPieceMsg)
ObOptTableStat *tmp_stat = OB_NEWx(ObOptTableStat, (&arena_));
if (OB_ISNULL(tmp_stat)) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("failed to allocate memory");
LOG_WARN("failed to allocate memory", K(ret));
} else if (OB_FAIL(tmp_stat->deserialize(buf, data_len, pos))) {
LOG_WARN("deserialize datum store failed", K(ret), K(i));
} else if (OB_FAIL(table_stats_.push_back(tmp_stat))) {
@ -57,9 +57,10 @@ OB_DEF_DESERIALIZE(ObOptStatsGatherPieceMsg)
for (int64_t i = 0; OB_SUCC(ret) && i < size; ++i) {
int col_stat_size = 0;
OB_UNIS_DECODE(col_stat_size);
ObOptColumnStat *tmp_col_stat = OB_NEWx(ObOptColumnStat, (&arena_), arena_);
ObOptColumnStat *tmp_col_stat = ObOptColumnStat::malloc_new_column_stat(arena_);
if (OB_ISNULL(tmp_col_stat)) {
LOG_WARN("failed to create new col stat");
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("failed to create new col stat", K(ret));
} else if (OB_FAIL(tmp_col_stat->deserialize(buf, data_len, pos))) {
LOG_WARN("deserialize datum store failed", K(ret), K(i));
} else if (OB_FAIL(column_stats_.push_back(tmp_col_stat))) {