You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/15 02:35:01 UTC

[GitHub] [incubator-doris] dataroaring commented on a diff in pull request #9569: [vec](load) fix core of segment_writer while it is not thread-safe

dataroaring commented on code in PR #9569:
URL: https://github.com/apache/incubator-doris/pull/9569#discussion_r873099721


##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -250,6 +255,12 @@ Status BetaRowsetWriter::flush_single_memtable(MemTable* memtable, int64_t* flus
     return Status::OK();
 }
 
+Status BetaRowsetWriter::flush_single_memtable(const vectorized::Block* block) {
+    std::unique_ptr<segment_v2::SegmentWriter> writer;
+    RETURN_NOT_OK(_create_segment_writer(&writer));
+    return _add_block(block, &writer);

Review Comment:
   We should handle flush here like flush_single_memtable for RowBatch.



##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -98,29 +98,34 @@ Status BetaRowsetWriter::init(const RowsetWriterContext& rowset_writer_context)
 }
 
 Status BetaRowsetWriter::add_block(const vectorized::Block* block) {

Review Comment:
   checkpoint should call the function.



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org