You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/18 02:51:09 UTC

[GitHub] [incubator-doris] HappenLee commented on a diff in pull request #9619: add tablet erros when close_wait return error

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-unsubscribe@doris.apache.org

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


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