yixiutt commented on code in PR #11557:
URL: https://github.com/apache/doris/pull/11557#discussion_r940094979
##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -272,6 +272,38 @@ RowsetSharedPtr BetaRowsetWriter::build() {
return rowset;
}
+RowsetSharedPtr BetaRowsetWriter::build_tmp() {
+ std::shared_ptr<RowsetMeta> rowset_meta_ = std::make_shared<RowsetMeta>();
+ *rowset_meta_ = *_rowset_meta;
+
+ rowset_meta_->set_num_rows(_num_rows_written);
+ rowset_meta_->set_total_disk_size(_total_data_size);
+ rowset_meta_->set_data_disk_size(_total_data_size);
+ rowset_meta_->set_index_disk_size(_total_index_size);
+ // TODO write zonemap to meta
+ rowset_meta_->set_empty(_num_rows_written == 0);
+ rowset_meta_->set_creation_time(time(nullptr));
+ rowset_meta_->set_num_segments(_num_segment);
+ if (_num_segment <= 1) {
+ rowset_meta_->set_segments_overlap(NONOVERLAPPING);
+ }
+ if (_is_pending) {
+ rowset_meta_->set_rowset_state(COMMITTED);
+ } else {
+ rowset_meta_->set_rowset_state(VISIBLE);
+ }
+ rowset_meta_->set_segments_key_bounds(_segments_encoded_key_bounds);
+
+ RowsetSharedPtr rowset;
+ auto status = RowsetFactory::create_rowset(_context.tablet_schema,
_context.tablet_path,
+ rowset_meta_, &rowset);
+ if (!status.ok()) {
+ LOG(WARNING) << "rowset init failed when build new rowset, res=" <<
status;
+ return nullptr;
+ }
+ return rowset;
+}
Review Comment:
done
##########
be/src/olap/memtable.cpp:
##########
@@ -406,6 +407,22 @@ Status MemTable::flush() {
DorisMetrics::instance()->memtable_flush_duration_us->increment(duration_ns /
1000);
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]