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: [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]