github-actions[bot] commented on code in PR #28550:
URL: https://github.com/apache/doris/pull/28550#discussion_r1429509834
##########
be/src/service/internal_service.cpp:
##########
@@ -407,45 +407,26 @@ void
PInternalServiceImpl::open_load_stream(google::protobuf::RpcController* con
}
}
-void
PInternalServiceImpl::tablet_writer_add_block(google::protobuf::RpcController*
controller,
- const
PTabletWriterAddBlockRequest* request,
-
PTabletWriterAddBlockResult* response,
- google::protobuf::Closure*
done) {
- bool ret = _heavy_work_pool.try_offer([this, controller, request,
response, done]() {
- _tablet_writer_add_block(controller, request, response, done);
- });
- if (!ret) {
- offer_failed(response, done, _heavy_work_pool);
- return;
- }
-}
-
void PInternalServiceImpl::tablet_writer_add_block_by_http(
google::protobuf::RpcController* controller, const
::doris::PEmptyRequest* request,
PTabletWriterAddBlockResult* response, google::protobuf::Closure*
done) {
- bool ret = _heavy_work_pool.try_offer([this, controller, response, done]()
{
- PTabletWriterAddBlockRequest* new_request = new
PTabletWriterAddBlockRequest();
- google::protobuf::Closure* new_done =
- new NewHttpClosure<PTabletWriterAddBlockRequest>(new_request,
done);
- brpc::Controller* cntl = static_cast<brpc::Controller*>(controller);
- Status st =
attachment_extract_request_contain_block<PTabletWriterAddBlockRequest>(
- new_request, cntl);
- if (st.ok()) {
- _tablet_writer_add_block(controller, new_request, response,
new_done);
- } else {
- st.to_protobuf(response->mutable_status());
- }
- });
- if (!ret) {
- offer_failed(response, done, _heavy_work_pool);
- return;
+ PTabletWriterAddBlockRequest* new_request = new
PTabletWriterAddBlockRequest();
+ google::protobuf::Closure* new_done =
+ new NewHttpClosure<PTabletWriterAddBlockRequest>(new_request,
done);
+ brpc::Controller* cntl = static_cast<brpc::Controller*>(controller);
+ Status st =
attachment_extract_request_contain_block<PTabletWriterAddBlockRequest>(new_request,
+
cntl);
+ if (st.ok()) {
+ tablet_writer_add_block(controller, new_request, response, new_done);
+ } else {
+ st.to_protobuf(response->mutable_status());
}
}
-void
PInternalServiceImpl::_tablet_writer_add_block(google::protobuf::RpcController*
controller,
- const
PTabletWriterAddBlockRequest* request,
-
PTabletWriterAddBlockResult* response,
- google::protobuf::Closure*
done) {
+void
PInternalServiceImpl::tablet_writer_add_block(google::protobuf::RpcController*
controller,
Review Comment:
warning: method 'tablet_writer_add_block' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static void
PInternalServiceImpl::tablet_writer_add_block(google::protobuf::RpcController*
controller,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]