chaoyli commented on a change in pull request #563: Modify schema change to use rowset URL: https://github.com/apache/incubator-doris/pull/563#discussion_r250465200
########## File path: be/src/olap/rowset/alpha_rowset.cpp ########## @@ -181,17 +189,65 @@ OLAPStatus AlphaRowset::_init_segment_groups() { << "version=" << version.first << "-" << version.second << ", " << "version_hash=" << version_hash; - return res; + return res; } } } _segment_group_size = _segment_groups.size(); if (_is_cumulative_rowset && _segment_group_size > 1) { LOG(WARNING) << "invalid segment group meta for cumulative rowset. segment group size:" << _segment_group_size; - return OLAP_ERR_ENGINE_LOAD_INDEX_TABLE_ERROR; + return OLAP_ERR_ENGINE_LOAD_INDEX_TABLE_ERROR; + } + return OLAP_SUCCESS; +} + +OLAPStatus AlphaRowset::_init_pending_segment_groups() { + std::vector<PendingSegmentGroupPB> pending_segment_group_metas; + AlphaRowsetMeta* _alpha_rowset_meta = (AlphaRowsetMeta*)_rowset_meta.get(); + _alpha_rowset_meta->get_pending_segment_groups(&pending_segment_group_metas); + for (auto& pending_segment_group_meta : pending_segment_group_metas) { + Version version = _rowset_meta->version(); + int64_t version_hash = _rowset_meta->version_hash(); + int64_t txn_id = _rowset_meta->txn_id(); + int64_t partition_id = _rowset_meta->partition_id(); + std::shared_ptr<SegmentGroup> segment_group(new SegmentGroup(_rowset_meta->tablet_id(), + _rowset_meta->rowset_id(), _tablet_schema, _num_key_fields, _num_short_key_fields, + _num_rows_per_row_block, _rowset_path, false, pending_segment_group_meta.pending_segment_group_id(), + pending_segment_group_meta.num_segments(), true, partition_id, txn_id)); + if (segment_group.get() == nullptr) { Review comment: segment_group == nullptr is OK. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org