liutang123 opened a new issue #3976:
URL: https://github.com/apache/incubator-doris/issues/3976


   In #2358, we remove an important logic of `_check_added_rowset`:
   ```Version version = {rowset->start_version(), rowset->end_version()};       
       RowsetSharedPtr exist_rs = get_rowset_by_version(version);       
       // if there exist a rowset with version_hash == 0, should delete it      
       if (exist_rs != nullptr && exist_rs->version_hash() == 0) {      
           vector<RowsetSharedPtr> to_add;      
           vector<RowsetSharedPtr> to_delete;   
           to_delete.push_back(exist_rs);       
           RETURN_NOT_OK(modify_rowsets(to_add, to_delete));    
       }
   ```
   This logic has a very important role to make BE compatible with 0.10.
   
   In our cluster, there are many partitions created by 0.10, and the tablets 
have two initial RSs [(0-1), 0] and [(2-2), 0].
   We updated the cluster to 0.11 and then to 0.12.
   Now, we load data to these partitions. BE will create a new RS. When pubish 
version, FE will try to let BE to set this RS to [(2-2), XXX] and add it to 
tablet. But, tablet has a same version RS [(2-2), 0]. So, the new RS will not 
be added to the tablet and the data will **lost**.
   
   Q1: Why we remove version_hash in 0.13?
   Q2: How to make doris to be compatible with previous version in this case?
   Q3: I use `/api/meta/header` to see these tablet and find that like follows:
   ```
   {
       "tablet_id": 218278919,
       "schema_hash": 39606704,
       "creation_time": 1576654229,
       ...
   "rs_metas": [
           {
               "rowset_id": 0,
               "tablet_id": 218278919,
               "tablet_schema_hash": 39606704,
               ...
              "empty": true,
              "creation_time": 1576654229,
   },
           {
               "rowset_id": 0,
               "tablet_id": 218278919,
               "tablet_schema_hash": 39606704,
               ...
              "empty": true,
               "creation_time": 1576654229,
            }
   }
   ```
   Is it possible to use the `creation_time` to determine whether a RS is the 
initial RS?
   


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



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

Reply via email to