imay commented on a change in pull request #2430: Fix BE 
do_tablet_meta_checkpoint retain _meta_lock for a long time
URL: https://github.com/apache/incubator-doris/pull/2430#discussion_r356610917
 
 

 ##########
 File path: be/src/olap/tablet.cpp
 ##########
 @@ -1065,12 +1065,17 @@ OLAPStatus Tablet::do_tablet_meta_checkpoint() {
     RETURN_NOT_OK(save_meta());
     // if save meta successfully, then should remove the rowset meta existing 
in tablet
     // meta from rowset meta store
-    for (auto& rs_meta :  _tablet_meta->all_rs_metas()) {
+    for (auto& rs_meta : _tablet_meta->all_rs_metas()) {
+        // If we delete it from rowset manager's meta explicitly in previous 
checkpoint, just skip.
+        if(rs_meta->is_remove_from_rowset_meta()) {
+            continue;
+        }
         if (RowsetMetaManager::check_rowset_meta(_data_dir->get_meta(), 
tablet_uid(), rs_meta->rowset_id())) {
             RowsetMetaManager::remove(_data_dir->get_meta(), tablet_uid(), 
rs_meta->rowset_id());
             LOG(INFO) << "remove rowset id from meta store because it is 
already persistent with tablet meta"
                        << ", rowset_id=" << rs_meta->rowset_id();
         }
+        rs_meta->set_remove_from_rowset_meta();
 
 Review comment:
   It seems that this line of code should be executed in above if clause.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to