sollhui commented on code in PR #48866: URL: https://github.com/apache/doris/pull/48866#discussion_r1986944568
########## be/src/olap/delta_writer.cpp: ########## @@ -291,17 +305,19 @@ void DeltaWriter::_request_slave_tablet_pull_rowset(const PNodeInfo& node_info) std::string inverted_index_file = InvertedIndexDescriptor::get_index_file_path_v1( index_path_prefix, index_meta.first, index_meta.second); - int64_t size = std::filesystem::file_size(inverted_index_file); - PTabletWriteSlaveRequest::IndexSize index_size; - index_size.set_indexid(index_meta.first); - index_size.set_size(size); - index_size.set_suffix_path(index_meta.second); - // Fetch the map value for the current segment_id. - // If it doesn't exist, this will insert a new default-constructed IndexSizeMapValue - auto& index_size_map_value = - (*(request->mutable_inverted_indices_size()))[segment_id]; - // Add the new index size to the map value. - *index_size_map_value.mutable_index_sizes()->Add() = std::move(index_size); + int64_t size = safe_get_file_size(inverted_index_file); Review Comment: Should return directly instead of not executing the logic if there is an exception? -- 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