You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/28 02:06:55 UTC

[GitHub] [incubator-doris] yiguolei commented on a change in pull request #1048: Remove rowsets generated before converting historical rowsets

yiguolei commented on a change in pull request #1048: Remove rowsets generated before converting historical rowsets
URL: https://github.com/apache/incubator-doris/pull/1048#discussion_r279174318
 
 

 ##########
 File path: be/src/olap/schema_change.cpp
 ##########
 @@ -1255,6 +1255,34 @@ OLAPStatus SchemaChangeHandler::process_alter_tablet(AlterTabletType type,
     base_tablet->obtain_header_wrlock();
     new_tablet->obtain_header_wrlock();
 
+    // before calculating version_to_be_changed,
+    // remove all data from new tablet, prevent to rewrite data(those double pushed when wait)
+    LOG(INFO) << "begin to remove all data from new tablet to prevent rewrite."
+              << " new_tablet=" << new_tablet->full_name();
+    // only remove the version <= base_tablet's max version
+    RowsetSharedPtr max_rowset = base_tablet->rowset_with_max_version();
+    if (max_rowset != nullptr) {
 
 Review comment:
   should fatal or return error if max_rowset == nullptr?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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