yujun777 commented on code in PR #25990:
URL: https://github.com/apache/doris/pull/25990#discussion_r1373991292


##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -2011,8 +2011,9 @@ Status 
StorageMediumMigrateTaskPool::_check_migrate_request(const TStorageMedium
         *dest_store = stores[0];
     }
     if (tablet->data_dir()->path() == (*dest_store)->path()) {
-        return Status::InternalError("tablet is already on specified path {}",
-                                     tablet->data_dir()->path());
+        LOG_WARNING("tablet is already on specified path")

Review Comment:
   返回ok之后,后续接着执行一个 
EngineStorageMigrationTask,这个任务会执行失败的。这里返回ok后,同时返回一个flag,标示不需要执行EngineStorageMigrationTask了。



##########
fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java:
##########
@@ -1642,6 +1656,7 @@ public boolean 
finishStorageMediaMigrationTask(StorageMediaMigrationTask migrati
             // if we have a success task, then stat must be refreshed before 
schedule a new task
             updateDiskBalanceLastSuccTime(tabletCtx.getSrcBackendId(), 
tabletCtx.getSrcPathHash());
             updateDiskBalanceLastSuccTime(tabletCtx.getDestBackendId(), 
tabletCtx.getDestPathHash());
+            updateDestPathHash(tabletCtx.getDestBackendId(), 
tabletCtx.getDestPathHash(), tabletCtx.getStorageMedium());

Review Comment:
   Replica的成员 path hash 指的就是哪块盘,磁盘迁移结束后,需要更新Replica的path hash 



##########
fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java:
##########
@@ -615,6 +616,19 @@ private void checkDiskBalanceLastSuccTime(long beId, long 
pathHash) throws Sched
         }
     }
 
+    public void updateDestPathHash(long beId, long pathHash, TStorageMedium 
storageMedium) {
+        PathSlot pathSlot = backendsWorkingSlots.get(beId);

Review Comment:
   这里的path slot是控制磁盘调度的并发度的,这里不用改



##########
fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java:
##########
@@ -1642,6 +1656,7 @@ public boolean 
finishStorageMediaMigrationTask(StorageMediaMigrationTask migrati
             // if we have a success task, then stat must be refreshed before 
schedule a new task
             updateDiskBalanceLastSuccTime(tabletCtx.getSrcBackendId(), 
tabletCtx.getSrcPathHash());
             updateDiskBalanceLastSuccTime(tabletCtx.getDestBackendId(), 
tabletCtx.getDestPathHash());
+            updateDestPathHash(tabletCtx.getDestBackendId(), 
tabletCtx.getDestPathHash(), tabletCtx.getStorageMedium());

Review Comment:
   Replica的成员 path hash 指的就是哪块盘,磁盘迁移结束后,需要更新Replica的path hash 



##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -2011,8 +2011,9 @@ Status 
StorageMediumMigrateTaskPool::_check_migrate_request(const TStorageMedium
         *dest_store = stores[0];
     }
     if (tablet->data_dir()->path() == (*dest_store)->path()) {
-        return Status::InternalError("tablet is already on specified path {}",
-                                     tablet->data_dir()->path());
+        LOG_WARNING("tablet is already on specified path")

Review Comment:
   返回ok之后,后续接着执行一个 
EngineStorageMigrationTask,这个任务会执行失败的。这里返回ok后,同时返回一个flag,标示不需要执行EngineStorageMigrationTask了。



##########
fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java:
##########
@@ -615,6 +616,19 @@ private void checkDiskBalanceLastSuccTime(long beId, long 
pathHash) throws Sched
         }
     }
 
+    public void updateDestPathHash(long beId, long pathHash, TStorageMedium 
storageMedium) {
+        PathSlot pathSlot = backendsWorkingSlots.get(beId);

Review Comment:
   这里的path slot是控制磁盘调度的并发度的,这里不用改



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

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to