Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion be/src/cloud/cloud_delete_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Status CloudDeleteTask::execute(CloudStorageEngine& engine, const TPushReq& requ
request.timeout, nullptr);
}

return Status::OK();
return st;
}

} // namespace doris
3 changes: 3 additions & 0 deletions be/src/cloud/cloud_meta_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ Status retry_rpc(std::string_view op_name, const Request& req, Response* res,
error_msg = cntl.ErrorText();
} else if (res->status().code() == MetaServiceCode::OK) {
return Status::OK();
} else if (res->status().code() == MetaServiceCode::INVALID_ARGUMENT) {
return Status::Error<ErrorCode::INVALID_ARGUMENT, false>("failed to {}: {}", op_name,
res->status().msg());
} else if (res->status().code() != MetaServiceCode::KV_TXN_CONFLICT) {
return Status::Error<ErrorCode::INTERNAL_ERROR, false>("failed to {}: {}", op_name,
res->status().msg());
Expand Down
8 changes: 5 additions & 3 deletions cloud/src/meta-service/meta_service_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,18 @@ inline MetaServiceCode cast_as(TxnErrorCode code) {
case TxnErrorCode::TXN_TIMEOUT:
case TxnErrorCode::TXN_INVALID_ARGUMENT:
case TxnErrorCode::TXN_UNIDENTIFIED_ERROR:
case TxnErrorCode::TXN_KEY_TOO_LARGE:
case TxnErrorCode::TXN_VALUE_TOO_LARGE:
case TxnErrorCode::TXN_BYTES_TOO_LARGE:
if constexpr (category == ErrCategory::READ) {
return MetaServiceCode::KV_TXN_GET_ERR;
} else if constexpr (category == ErrCategory::CREATE) {
return MetaServiceCode::KV_TXN_CREATE_ERR;
} else {
return MetaServiceCode::KV_TXN_COMMIT_ERR;
}
[[fallthrough]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[[fallthrough]];

case TxnErrorCode::TXN_KEY_TOO_LARGE:
case TxnErrorCode::TXN_VALUE_TOO_LARGE:
case TxnErrorCode::TXN_BYTES_TOO_LARGE:
return MetaServiceCode::INVALID_ARGUMENT;
default:
return MetaServiceCode::UNDEFINED_ERR;
}
Expand Down