chaoyli commented on a change in pull request #910: Rowset maybe nullptr when 
pulish version
URL: https://github.com/apache/incubator-doris/pull/910#discussion_r274738599
 
 

 ##########
 File path: be/src/olap/tablet.cpp
 ##########
 @@ -230,13 +230,10 @@ OLAPStatus Tablet::deregister_tablet_from_dir() {
 
 OLAPStatus Tablet::add_rowset(RowsetSharedPtr rowset) {
     WriteLock wrlock(&_meta_lock);
-    return add_rowset_unlock(rowset);
-}
-
-OLAPStatus Tablet::add_rowset_unlock(RowsetSharedPtr rowset) {
     RETURN_NOT_OK(_tablet_meta->add_rs_meta(rowset->rowset_meta()));
     _rs_version_map[rowset->version()] = rowset;
     RETURN_NOT_OK(_rs_graph.add_version_to_graph(rowset->version()));
+    RETURN_NOT_OK(save_meta());
 
 Review comment:
   I found the place which call add_rowset always save_meta(). This may lead to 
save_meta repeatedly.

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