HappenLee commented on code in PR #9619:
URL: https://github.com/apache/incubator-doris/pull/9619#discussion_r875422297


##########
be/src/runtime/tablets_channel.cpp:
##########
@@ -129,9 +129,16 @@ Status TabletsChannel::close(int sender_id, int64_t 
backend_id, bool* finished,
         for (auto writer : need_wait_writers) {
             // close may return failed, but no need to handle it here.
             // tablet_vec will only contains success tablet, and then let FE 
judge it.
-            writer->close_wait(
-                    tablet_vec, tablet_errors,
+            Status st = writer->close_wait(
+                    tablet_vec,
                     (_broken_tablets.find(writer->tablet_id()) != 
_broken_tablets.end()));
+            if (!st.ok()) {
+#ifndef BE_TEST
+                PTabletError* tablet_error = tablet_errors->Add();

Review Comment:
   change the code to a function. and also move 
   ```#ifndef BE_TEST
       if (!is_broken) {
           PTabletInfo* tablet_info = tablet_vec->Add();
           tablet_info->set_tablet_id(_tablet->tablet_id());
           tablet_info->set_schema_hash(_tablet->schema_hash());
       }
   #endif
   ```
   
    to this funciton to remove unless #ifndef



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