This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit 066012c3bf3962ded26bf62f9a94f9916237a958 Author: zhannngchen <48427519+zhannngc...@users.noreply.github.com> AuthorDate: Tue Apr 4 12:42:07 2023 +0800 [improvement](merge-on-write) remove CHECK if lookup_row_key return unexpected status (#18326) --- be/src/olap/tablet.cpp | 9 +++++++-- be/src/olap/task/engine_publish_version_task.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index 2a9ec97e18..084ee03f24 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -2105,7 +2105,11 @@ Status Tablet::calc_delete_bitmap(RowsetId rowset_id, if (specified_rowset_ids != nullptr && !specified_rowset_ids->empty()) { auto st = lookup_row_key(key, specified_rowset_ids, &loc, dummy_version.first - 1); - CHECK(st.ok() || st.is<NOT_FOUND>() || st.is<ALREADY_EXIST>()); + bool expected_st = st.ok() || st.is<NOT_FOUND>() || st.is<ALREADY_EXIST>(); + DCHECK(expected_st) << "unexpected error status while lookup_row_key:" << st; + if (!expected_st) { + return st; + } if (st.is<NOT_FOUND>()) { ++row_id; continue; @@ -2148,7 +2152,8 @@ Status Tablet::_check_pk_in_pre_segments( const Slice& key, DeleteBitmapPtr delete_bitmap, RowLocation* loc) { for (auto it = pre_segments.rbegin(); it != pre_segments.rend(); ++it) { auto st = (*it)->lookup_row_key(key, loc); - CHECK(st.ok() || st.is<NOT_FOUND>() || st.is<ALREADY_EXIST>()); + DCHECK(st.ok() || st.is<NOT_FOUND>() || st.is<ALREADY_EXIST>()) + << "unexpected error status while lookup_row_key:" << st; if (st.is<NOT_FOUND>()) { continue; } else if (st.ok() && _schema->has_sequence_col() && diff --git a/be/src/olap/task/engine_publish_version_task.cpp b/be/src/olap/task/engine_publish_version_task.cpp index 5d3a65cf3c..8fd438354a 100644 --- a/be/src/olap/task/engine_publish_version_task.cpp +++ b/be/src/olap/task/engine_publish_version_task.cpp @@ -148,7 +148,7 @@ Status EnginePublishVersionTask::finish() { auto submit_st = StorageEngine::instance()->tablet_publish_txn_thread_pool()->submit_func( [=]() { tablet_publish_txn_ptr->handle(); }); - CHECK(submit_st.ok()); + CHECK(submit_st.ok()) << submit_st; } } // wait for all publish txn finished --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org