[improvement](merge-on-write) remove CHECK if lookup_row_key return unexpected status (#18326)

This commit is contained in:
zhannngchen
2023-04-04 12:42:07 +08:00
committed by GitHub
parent 87e83081ff
commit 175e5d405c
2 changed files with 8 additions and 3 deletions

View File

@ -2522,7 +2522,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;
@ -2565,7 +2569,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() &&

View File

@ -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