github-actions[bot] commented on code in PR #18980:
URL: https://github.com/apache/doris/pull/18980#discussion_r1174744635


##########
be/src/runtime/load_channel.cpp:
##########
@@ -104,6 +104,60 @@
     return Status::OK();
 }
 
+Status LoadChannel::add_batch(const PTabletWriterAddBlockRequest& request,
+                              PTabletWriterAddBlockResult* response) {
+    int64_t index_id = request.index_id();
+    // 1. get tablets channel
+    std::shared_ptr<TabletsChannel> channel;
+    bool is_finished;
+    Status st = _get_tablets_channel(channel, is_finished, index_id);
+    if (!st.ok() || is_finished) {
+        return st;
+    }
+
+    // 2. add block to tablets channel
+    if (request.has_block()) {
+        RETURN_IF_ERROR(channel->add_batch(request, response));
+        _add_batch_number_counter->update(1);
+    }
+
+    // 3. handle eos
+    if (request.has_eos() && request.eos()) {
+        st = _handle_eos(channel, request, response);
+        _report_profile<TabletWriterAddResult>(response);

Review Comment:
   warning: unknown type name 'TabletWriterAddResult'; did you mean 
'PTabletWriterOpenResult'? [clang-diagnostic-error]
   
   ```suggestion
           _report_profile<PTabletWriterOpenResult>(response);
   ```
   **gensrc/build/gen_cpp/internal_service.pb.h:1805:** 
'PTabletWriterOpenResult' declared here
   ```cpp
   class PTabletWriterOpenResult PROTOBUF_FINAL :
         ^
   ```
   



##########
be/src/runtime/load_channel.cpp:
##########
@@ -104,6 +104,60 @@ Status 
LoadChannel::_get_tablets_channel(std::shared_ptr<TabletsChannel>& channe
     return Status::OK();
 }
 
+Status LoadChannel::add_batch(const PTabletWriterAddBlockRequest& request,
+                              PTabletWriterAddBlockResult* response) {
+    int64_t index_id = request.index_id();
+    // 1. get tablets channel
+    std::shared_ptr<TabletsChannel> channel;
+    bool is_finished;
+    Status st = _get_tablets_channel(channel, is_finished, index_id);
+    if (!st.ok() || is_finished) {
+        return st;
+    }
+
+    // 2. add block to tablets channel
+    if (request.has_block()) {
+        RETURN_IF_ERROR(channel->add_batch(request, response));
+        _add_batch_number_counter->update(1);
+    }
+
+    // 3. handle eos
+    if (request.has_eos() && request.eos()) {
+        st = _handle_eos(channel, request, response);
+        _report_profile<TabletWriterAddResult>(response);

Review Comment:
   warning: '_report_profile' does not name a template but is followed by 
template arguments [clang-diagnostic-error]
   ```cpp
           _report_profile<TabletWriterAddResult>(response);
           ^
   ```
   **be/src/runtime/load_channel.h:142:** non-template declaration found by 
name lookup
   ```cpp
       void _report_profile(PTabletWriterAddBlockResult* response);
            ^
   ```
   



##########
be/src/runtime/load_channel.cpp:
##########
@@ -104,6 +104,60 @@
     return Status::OK();
 }
 
+Status LoadChannel::add_batch(const PTabletWriterAddBlockRequest& request,
+                              PTabletWriterAddBlockResult* response) {
+    int64_t index_id = request.index_id();
+    // 1. get tablets channel
+    std::shared_ptr<TabletsChannel> channel;
+    bool is_finished;
+    Status st = _get_tablets_channel(channel, is_finished, index_id);
+    if (!st.ok() || is_finished) {
+        return st;
+    }
+
+    // 2. add block to tablets channel
+    if (request.has_block()) {
+        RETURN_IF_ERROR(channel->add_batch(request, response));
+        _add_batch_number_counter->update(1);
+    }
+
+    // 3. handle eos
+    if (request.has_eos() && request.eos()) {
+        st = _handle_eos(channel, request, response);
+        _report_profile<TabletWriterAddResult>(response);
+        if (!st.ok()) {
+            return st;
+        }
+    } else if (_add_batch_number_counter->value() % 10 == 1) {
+        _report_profile<TabletWriterAddResult>(response);

Review Comment:
   warning: unknown type name 'TabletWriterAddResult'; did you mean 
'PTabletWriterOpenResult'? [clang-diagnostic-error]
   
   ```suggestion
           _report_profile<PTabletWriterOpenResult>(response);
   ```
   **gensrc/build/gen_cpp/internal_service.pb.h:1805:** 
'PTabletWriterOpenResult' declared here
   ```cpp
   class PTabletWriterOpenResult PROTOBUF_FINAL :
         ^
   ```
   



##########
be/src/runtime/load_channel.cpp:
##########
@@ -104,6 +104,60 @@
     return Status::OK();
 }
 
+Status LoadChannel::add_batch(const PTabletWriterAddBlockRequest& request,
+                              PTabletWriterAddBlockResult* response) {
+    int64_t index_id = request.index_id();
+    // 1. get tablets channel
+    std::shared_ptr<TabletsChannel> channel;
+    bool is_finished;
+    Status st = _get_tablets_channel(channel, is_finished, index_id);
+    if (!st.ok() || is_finished) {
+        return st;
+    }
+
+    // 2. add block to tablets channel
+    if (request.has_block()) {
+        RETURN_IF_ERROR(channel->add_batch(request, response));
+        _add_batch_number_counter->update(1);
+    }
+
+    // 3. handle eos
+    if (request.has_eos() && request.eos()) {
+        st = _handle_eos(channel, request, response);
+        _report_profile<TabletWriterAddResult>(response);
+        if (!st.ok()) {
+            return st;
+        }
+    } else if (_add_batch_number_counter->value() % 10 == 1) {
+        _report_profile<TabletWriterAddResult>(response);

Review Comment:
   warning: '_report_profile' does not name a template but is followed by 
template arguments [clang-diagnostic-error]
   ```cpp
           _report_profile<TabletWriterAddResult>(response);
           ^
   ```
   **be/src/runtime/load_channel.h:142:** non-template declaration found by 
name lookup
   ```cpp
       void _report_profile(PTabletWriterAddBlockResult* response);
            ^
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to