This is an automated email from the ASF dual-hosted git repository. dataroaring 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 d08b231073 [fix](segcompaction) core when doing segcompaction for cancelling load(#16731) (#17432) d08b231073 is described below commit d08b2310737402b75a00f9d82fb4eb95916fa2f3 Author: zhengyu <freeman.zhang1...@gmail.com> AuthorDate: Sun Mar 5 21:24:32 2023 +0800 [fix](segcompaction) core when doing segcompaction for cancelling load(#16731) (#17432) segcompaction is async and in parallel with load job. If the load job is canncelling, memory structures will be destroyed and cause segcompaction crash. This commit will wait segcompaction finished before destruction. --- be/src/olap/rowset/beta_rowset_writer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/be/src/olap/rowset/beta_rowset_writer.cpp b/be/src/olap/rowset/beta_rowset_writer.cpp index 91a9774560..684d42a1f8 100644 --- a/be/src/olap/rowset/beta_rowset_writer.cpp +++ b/be/src/olap/rowset/beta_rowset_writer.cpp @@ -62,7 +62,11 @@ BetaRowsetWriter::BetaRowsetWriter() } BetaRowsetWriter::~BetaRowsetWriter() { - // OLAP_UNUSED_ARG(_wait_flying_segcompaction()); + /* Note that segcompaction is async and in parallel with load job. So we should handle carefully + * when the job is cancelled. Although it is meaningless to continue segcompaction when the job + * is cancelled, the objects involved in the job should be preserved during segcompaction to + * avoid crashs for memory issues. */ + OLAP_UNUSED_ARG(_wait_flying_segcompaction()); // TODO(lingbin): Should wrapper exception logic, no need to know file ops directly. if (!_already_built) { // abnormal exit, remove all files generated --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org