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/16 10:24:27 UTC

[GitHub] [incubator-doris] yiguolei commented on a change in pull request #932: Refactor tablet mgr code

yiguolei commented on a change in pull request #932: Refactor tablet mgr code
URL: https://github.com/apache/incubator-doris/pull/932#discussion_r275730472
 
 

 ##########
 File path: be/src/olap/tablet_manager.cpp
 ##########
 @@ -100,15 +99,22 @@ OLAPStatus TabletManager::add_tablet(TTabletId tablet_id, SchemaHash schema_hash
     if (table_item == nullptr) {
         _tablet_map[tablet_id].table_arr.push_back(tablet);
         _tablet_map[tablet_id].table_arr.sort(_sort_tablet_by_creation_time);
-        _tablet_map_lock.unlock();
         return res;
     }
-    _tablet_map_lock.unlock();
 
     if (!force) {
         if (table_item->tablet_path() == tablet->tablet_path()) {
             LOG(WARNING) << "add the same tablet twice! tablet_id="
-                << tablet_id << " schema_hash=" << tablet_id;
+                         << tablet_id << " schema_hash=" << tablet_id;
+            return OLAP_ERR_ENGINE_INSERT_EXISTS_TABLE;
+        }
+    }
+
+    // if not force, the data dir should not same
+    if (!force) {
+        if (table_item->data_dir() == tablet->data_dir()) {
 
 Review comment:
   done

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