platoneko commented on code in PR #10280: URL: https://github.com/apache/doris/pull/10280#discussion_r911963044
########## be/src/olap/rowset/beta_rowset_writer.cpp: ########## @@ -304,29 +270,28 @@ RowsetSharedPtr BetaRowsetWriter::build() { Status BetaRowsetWriter::_create_segment_writer( std::unique_ptr<segment_v2::SegmentWriter>* writer) { - auto path_desc = - BetaRowset::segment_file_path(_context.path_desc, _context.rowset_id, _num_segment++); - // TODO(lingbin): should use a more general way to get BlockManager object - // and tablets with the same type should share one BlockManager object; - fs::BlockManager* block_mgr = fs::fs_util::block_manager(_context.path_desc); - std::unique_ptr<fs::WritableBlock> wblock; - fs::CreateBlockOptions opts(path_desc); - DCHECK(block_mgr != nullptr); - Status st = block_mgr->create_block(opts, &wblock); + auto path = BetaRowset::local_segment_path(_context.tablet_path, _context.rowset_id, + _num_segment++); + auto fs = _rowset_meta->fs(); + if (!fs) { Review Comment: We print WARNING LOG in RowsetMeta->fs() ########## be/src/olap/rowset/beta_rowset_writer.cpp: ########## @@ -304,29 +270,28 @@ RowsetSharedPtr BetaRowsetWriter::build() { Status BetaRowsetWriter::_create_segment_writer( std::unique_ptr<segment_v2::SegmentWriter>* writer) { - auto path_desc = - BetaRowset::segment_file_path(_context.path_desc, _context.rowset_id, _num_segment++); - // TODO(lingbin): should use a more general way to get BlockManager object - // and tablets with the same type should share one BlockManager object; - fs::BlockManager* block_mgr = fs::fs_util::block_manager(_context.path_desc); - std::unique_ptr<fs::WritableBlock> wblock; - fs::CreateBlockOptions opts(path_desc); - DCHECK(block_mgr != nullptr); - Status st = block_mgr->create_block(opts, &wblock); + auto path = BetaRowset::local_segment_path(_context.tablet_path, _context.rowset_id, + _num_segment++); + auto fs = _rowset_meta->fs(); + if (!fs) { Review Comment: We print WARNING LOG in RowsetMeta::fs() -- 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