This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e2d5532e3f0 [improvement](disk migration) disk migration skip cooldown 
tablets (#27807)
e2d5532e3f0 is described below

commit e2d5532e3f0fe9bec6b3edb1b87546b89836257a
Author: yujun <[email protected]>
AuthorDate: Sun Dec 3 23:05:52 2023 +0800

    [improvement](disk migration) disk migration skip cooldown tablets (#27807)
---
 .../org/apache/doris/clone/DiskRebalancer.java     | 26 ++++++----------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java 
b/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java
index 3ab069d09ec..36fcb2a4e25 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java
@@ -18,10 +18,7 @@
 package org.apache.doris.clone;
 
 import org.apache.doris.catalog.CatalogRecycleBin;
-import org.apache.doris.catalog.DataProperty;
-import org.apache.doris.catalog.Database;
 import org.apache.doris.catalog.Env;
-import org.apache.doris.catalog.OlapTable;
 import org.apache.doris.catalog.Replica;
 import org.apache.doris.catalog.TabletInvertedIndex;
 import org.apache.doris.catalog.TabletMeta;
@@ -33,8 +30,8 @@ import org.apache.doris.clone.TabletScheduler.PathSlot;
 import org.apache.doris.common.FeConstants;
 import org.apache.doris.system.SystemInfoService;
 import org.apache.doris.thrift.TStorageMedium;
+import org.apache.doris.thrift.TUniqueId;
 
-import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
@@ -222,6 +219,12 @@ public class DiskRebalancer extends Rebalancer {
                     continue;
                 }
 
+                // backend not support migrate cooldown tablets
+                TUniqueId cooldownMetaId = replica.getCooldownMetaId();
+                if (cooldownMetaId != null && (cooldownMetaId.getLo() != 0 || 
cooldownMetaId.getHi() != 0)) {
+                    continue;
+                }
+
                 // check if replica's is on 'high' path.
                 // and only select it if the selected tablets num of this path
                 // does not exceed the limit (BALANCE_SLOT_NUM_FOR_PATH).
@@ -303,21 +306,6 @@ public class DiskRebalancer extends Rebalancer {
         if (replica.getDataSize() == 0) {
             throw new SchedException(Status.UNRECOVERABLE, 
SubCode.DIAGNOSE_IGNORE, "size of src replica is zero");
         }
-        Database db = 
Env.getCurrentInternalCatalog().getDbOrException(tabletCtx.getDbId(),
-                s -> new SchedException(Status.UNRECOVERABLE, 
SubCode.DIAGNOSE_IGNORE,
-                        "db " + tabletCtx.getDbId() + " does not exist"));
-        OlapTable tbl = (OlapTable) 
db.getTableOrException(tabletCtx.getTblId(),
-                s -> new SchedException(Status.UNRECOVERABLE, 
SubCode.DIAGNOSE_IGNORE,
-                        "tbl " + tabletCtx.getTblId() + " does not exist"));
-        DataProperty dataProperty = 
tbl.getPartitionInfo().getDataProperty(tabletCtx.getPartitionId());
-        if (dataProperty == null) {
-            throw new SchedException(Status.UNRECOVERABLE, "data property is 
null");
-        }
-        String storagePolicy = dataProperty.getStoragePolicy();
-        if (!Strings.isNullOrEmpty(storagePolicy)) {
-            throw new SchedException(Status.UNRECOVERABLE, 
SubCode.DIAGNOSE_IGNORE,
-                    "disk balance not support for cooldown storage");
-        }
 
         // check src slot
         PathSlot slot = backendsWorkingSlots.get(replica.getBackendId());


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

Reply via email to