kangpinghuang commented on a change in pull request #2549: fix segment size URL: https://github.com/apache/incubator-doris/pull/2549#discussion_r361175146
########## File path: be/src/olap/rowset/segment_v2/page_compression.cpp ########## @@ -88,5 +88,33 @@ Status PageCompressor::compress(const std::vector<Slice>& raw_data, return Status::OK(); } +Status PageCompressor::compress(const std::vector<Slice>& raw_data, + OwnedSlice* compressed_data, bool* compressed) { + size_t uncompressed_bytes = Slice::compute_total_size(raw_data); + size_t max_compressed_bytes = _codec->max_compressed_len(uncompressed_bytes); + _buf.resize(max_compressed_bytes + 4); + Slice compressed_slice(_buf.data(), max_compressed_bytes); Review comment: change it to compression_buffer ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org