morningman commented on code in PR #9065:
URL: https://github.com/apache/incubator-doris/pull/9065#discussion_r878881881


##########
be/src/olap/compaction.cpp:
##########
@@ -114,7 +114,7 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     TRACE("check correctness finished");
 
     // 4. modify rowsets in memory
-    modify_rowsets();
+    RETURN_NOT_OK(modify_rowsets())

Review Comment:
   ```suggestion
       RETURN_NOT_OK(modify_rowsets());
   ```



##########
be/src/olap/compaction.cpp:
##########
@@ -174,13 +174,16 @@ Status Compaction::construct_input_rowset_readers() {
     return Status::OK();
 }
 
-void Compaction::modify_rowsets() {
+Status Compaction::modify_rowsets() {
     std::vector<RowsetSharedPtr> output_rowsets;
     output_rowsets.push_back(_output_rowset);
-
     std::lock_guard<std::shared_mutex> wrlock(_tablet->get_header_lock());
-    _tablet->modify_rowsets(output_rowsets, _input_rowsets);
-    _tablet->save_meta();
+    if (_tablet->modify_rowsets(output_rowsets, _input_rowsets, true)) {

Review Comment:
   Change to:
   ```
   RETURN_NOT_OK(_tablet->modify_rowsets(output_rowsets, _input_rowsets, true));
   _tablet->save_meta();
   return Status::OK();
   ```



##########
be/src/olap/tablet.cpp:
##########
@@ -247,8 +248,9 @@ Status Tablet::add_rowset(RowsetSharedPtr rowset, bool 
need_persist) {
     return Status::OK();
 }
 
-void Tablet::modify_rowsets(std::vector<RowsetSharedPtr>& to_add,
-                            std::vector<RowsetSharedPtr>& to_delete) {
+bool Tablet::modify_rowsets(std::vector<RowsetSharedPtr>& to_add,

Review Comment:
   Change return type to Status



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

Reply via email to