morningman commented on a change in pull request #3762:
URL: https://github.com/apache/incubator-doris/pull/3762#discussion_r436788740



##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -98,26 +99,34 @@ OLAPStatus TabletManager::_add_tablet_unlocked(TTabletId 
tablet_id, SchemaHash s
 
     if (existed_tablet == nullptr) {
         return _add_tablet_to_map_unlocked(tablet_id, schema_hash,
-                                           tablet, update_meta,
+                                           base_tablet, update_meta,
                                            false /*keep_files*/, false 
/*drop_old*/);
     }
 
     if (!force) {
-        if (existed_tablet->tablet_path() == tablet->tablet_path()) {
+        if (existed_tablet->tablet_path() == base_tablet->tablet_path()) {
             LOG(WARNING) << "add the same tablet twice! tablet_id=" << 
tablet_id
                          << ", schema_hash=" << schema_hash
-                         << ", tablet_path=" << tablet->tablet_path();
+                         << ", tablet_path=" << base_tablet->tablet_path();
             return OLAP_ERR_ENGINE_INSERT_EXISTS_TABLE;
         }
-        if (existed_tablet->data_dir() == tablet->data_dir()) {
+        if (existed_tablet->data_dir() == base_tablet->data_dir()) {
             LOG(WARNING) << "add tablet with same data dir twice! tablet_id=" 
<< tablet_id
                          << ", schema_hash=" << schema_hash;
             return OLAP_ERR_ENGINE_INSERT_EXISTS_TABLE;
         }
     }
 
+    if (base_tablet->is_memory() || existed_tablet->is_memory()) {
+        LOG(WARNING) << "add the same tablet twice! tablet_id=" << tablet_id

Review comment:
       Change the comment




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