This is an automated email from the ASF dual-hosted git repository. gabriellee pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 73d4070708 [bugfix](compaction) fix missing key_bounds in vertical compaction (#15578) 73d4070708 is described below commit 73d4070708e4fcf5b2f0f6e2d4633cf419f204e1 Author: yixiutt <102007456+yixi...@users.noreply.github.com> AuthorDate: Wed Jan 4 13:39:09 2023 +0800 [bugfix](compaction) fix missing key_bounds in vertical compaction (#15578) When flush last segment of every column, missing set segment key bound for rowset meta so that rowset tree init error. --- be/src/olap/merger.cpp | 2 +- be/src/olap/rowset/rowset_writer.h | 4 +++- be/src/olap/rowset/vertical_beta_rowset_writer.cpp | 4 ++-- be/src/olap/rowset/vertical_beta_rowset_writer.h | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/be/src/olap/merger.cpp b/be/src/olap/merger.cpp index 19f8d727e2..e91949a11c 100644 --- a/be/src/olap/merger.cpp +++ b/be/src/olap/merger.cpp @@ -239,7 +239,7 @@ Status Merger::vertical_compact_one_group( stats_output->merged_rows = reader.merged_rows(); stats_output->filtered_rows = reader.filtered_rows(); } - RETURN_IF_ERROR(dst_rowset_writer->flush_columns()); + RETURN_IF_ERROR(dst_rowset_writer->flush_columns(is_key)); return Status::OK(); } diff --git a/be/src/olap/rowset/rowset_writer.h b/be/src/olap/rowset/rowset_writer.h index 7cf850b864..7164620d58 100644 --- a/be/src/olap/rowset/rowset_writer.h +++ b/be/src/olap/rowset/rowset_writer.h @@ -59,7 +59,9 @@ public: // explicit flush all buffered rows into segment file. // note that `add_row` could also trigger flush when certain conditions are met virtual Status flush() = 0; - virtual Status flush_columns() { return Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(); } + virtual Status flush_columns(bool is_key) { + return Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(); + } virtual Status final_flush() { return Status::Error<ErrorCode::NOT_IMPLEMENTED_ERROR>(); } virtual Status flush_single_memtable(MemTable* memtable, int64_t* flush_size) { diff --git a/be/src/olap/rowset/vertical_beta_rowset_writer.cpp b/be/src/olap/rowset/vertical_beta_rowset_writer.cpp index 890f80e97d..ef7b2c4254 100644 --- a/be/src/olap/rowset/vertical_beta_rowset_writer.cpp +++ b/be/src/olap/rowset/vertical_beta_rowset_writer.cpp @@ -115,13 +115,13 @@ Status VerticalBetaRowsetWriter::_flush_columns( return Status::OK(); } -Status VerticalBetaRowsetWriter::flush_columns() { +Status VerticalBetaRowsetWriter::flush_columns(bool is_key) { if (_segment_writers.empty()) { return Status::OK(); } DCHECK(_segment_writers[_cur_writer_idx]); - RETURN_IF_ERROR(_flush_columns(&_segment_writers[_cur_writer_idx])); + RETURN_IF_ERROR(_flush_columns(&_segment_writers[_cur_writer_idx], is_key)); _cur_writer_idx = 0; return Status::OK(); } diff --git a/be/src/olap/rowset/vertical_beta_rowset_writer.h b/be/src/olap/rowset/vertical_beta_rowset_writer.h index 2c055ecb41..56e2fb4d6a 100644 --- a/be/src/olap/rowset/vertical_beta_rowset_writer.h +++ b/be/src/olap/rowset/vertical_beta_rowset_writer.h @@ -32,7 +32,7 @@ public: bool is_key, uint32_t max_rows_per_segment); // flush last segment's column - Status flush_columns(); + Status flush_columns(bool is_key); // flush when all column finished, flush column footer Status final_flush(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org