zhannngchen commented on code in PR #12866:
URL: https://github.com/apache/doris/pull/12866#discussion_r977705741


##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -309,12 +641,23 @@ Status BetaRowsetWriter::_create_segment_writer(
     DCHECK(file_writer != nullptr);
     segment_v2::SegmentWriterOptions writer_options;
     writer_options.enable_unique_key_merge_on_write = 
_context.enable_unique_key_merge_on_write;
-    writer->reset(new segment_v2::SegmentWriter(file_writer.get(), 
_num_segment,
-                                                _context.tablet_schema, 
_context.data_dir,
-                                                _context.max_rows_per_segment, 
writer_options));
-    {
-        std::lock_guard<SpinLock> l(_lock);
-        _file_writers.push_back(std::move(file_writer));
+
+    if (is_segcompaction) {
+        writer->reset(new segment_v2::SegmentWriter(file_writer.get(), 
_num_segcompacted + 1,

Review Comment:
   The only difference of these 2 branch is the parameter sgement_id?



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to