You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "deardeng (via GitHub)" <gi...@apache.org> on 2023/10/26 14:45:35 UTC

[PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

deardeng opened a new pull request, #25990:
URL: https://github.com/apache/doris/pull/25990

   …r a disk balance task has succ
   
   ## Proposed changes
   
   1. When the BE side discovers that the migration path is already in the dest path, an error will be returned, and an OK should be returned at this time
   2. After the task is completed, FE does not update the path hash of the replica current. This may still result in the tablet being disk rebalanced in the future. Until one minute later when the tablet is updated and reported
   
   ![img_v2_136c7582-f2cc-414d-8457-2db5278270eg](https://github.com/apache/doris/assets/3887565/3bc486e9-3df1-47de-8fd2-9b073d9169c3)
   
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
yujun777 commented on code in PR #25990:
URL: https://github.com/apache/doris/pull/25990#discussion_r1388793581


##########
fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java:
##########
@@ -185,7 +186,17 @@ protected List<TabletSchedCtx> selectAlternativeTabletsForCluster(
             Set<Long> pathHigh = Sets.newHashSet();
             // we only select tablets from available high load path
             beStat.getPathStatisticByClass(pathLow, pathMid, pathHigh, medium);
+            LOG.info("dx test select before low={} mid={} high={} medium={}", pathLow, pathMid, pathHigh, medium);
             // check if BE has low and high paths for balance after reclassification
+            pathHigh.add(-2606726262674133323L);

Review Comment:
   test code 



##########
fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java:
##########
@@ -120,6 +120,7 @@ private boolean checkAndReclassifyPaths(Set<Long> pathLow, Set<Long> pathMid, Se
     @Override
     protected List<TabletSchedCtx> selectAlternativeTabletsForCluster(
             LoadStatisticForTag clusterStat, TStorageMedium medium) {
+        LOG.info("dx test enter selectAlternativeTabletsForCluster");

Review Comment:
   test code



-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "deardeng (via GitHub)" <gi...@apache.org>.
deardeng commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1803320359

   run buildall


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "deardeng (via GitHub)" <gi...@apache.org>.
deardeng commented on code in PR #25990:
URL: https://github.com/apache/doris/pull/25990#discussion_r1374307517


##########
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:
   fixed



-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1803327835

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1787194837

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "yujun777 (via GitHub)" <gi...@apache.org>.
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "deardeng (via GitHub)" <gi...@apache.org>.
deardeng commented on code in PR #25990:
URL: https://github.com/apache/doris/pull/25990#discussion_r1374219882


##########
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:
   fixed



-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1803345190

   TeamCity be ut coverage result:
    Function Coverage: 36.75% (8400/22857) 
    Line Coverage: 29.25% (68128/232913)
    Region Coverage: 27.90% (35225/126265)
    Branch Coverage: 24.70% (18001/72876)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/8b11bda64c9429f29f795cc2e08fcdbfc8f240f8_8b11bda64c9429f29f795cc2e08fcdbfc8f240f8/report/index.html


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1787218086

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1782603621

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1781294853

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1804968932

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #25990:
URL: https://github.com/apache/doris/pull/25990


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1787232153

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1787189329

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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-unsubscribe@doris.apache.org

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


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


Re: [PR] [improvement](disk balance) Prevent duplicate disk balance tasks afte… [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #25990:
URL: https://github.com/apache/doris/pull/25990#issuecomment-1803363779

   (From new machine)TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 44.77 seconds
    stream load tsv:          550 seconds loaded 74807831229 Bytes, about 129 MB/s
    stream load json:         20 seconds loaded 2358488459 Bytes, about 112 MB/s
    stream load orc:          65 seconds loaded 1101869774 Bytes, about 16 MB/s
    stream load parquet:          33 seconds loaded 861443392 Bytes, about 24 MB/s
    insert into select:          29.0 seconds inserted 10000000 Rows, about 344K ops/s
    storage size: 17162281432 Bytes


-- 
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-unsubscribe@doris.apache.org

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


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