This is an automated email from the ASF dual-hosted git repository.
eldenmoon pushed a commit to branch branch-2.0-var
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0-var by this push:
new 79e24754a8a [branch-2.0-var](disk migration) disk migration skip
cooldown tablets #27807 (#27812)
79e24754a8a is described below
commit 79e24754a8ae12a623ba94ce55868e9dbff6d62b
Author: yujun <[email protected]>
AuthorDate: Thu Nov 30 21:30:41 2023 +0800
[branch-2.0-var](disk migration) disk migration skip cooldown tablets
#27807 (#27812)
* update disk balance
* update
---
.../org/apache/doris/clone/DiskRebalancer.java | 23 +++++++---------------
1 file changed, 7 insertions(+), 16 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 c6ac727a405..42d2ab1ba39 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.common.Config;
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;
@@ -220,6 +217,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).
@@ -301,18 +304,6 @@ public class DiskRebalancer extends Rebalancer {
if (replica.getDataSize() == 0) {
throw new SchedException(Status.UNRECOVERABLE, "size of src
replica is zero");
}
- Database db =
Env.getCurrentInternalCatalog().getDbOrException(tabletCtx.getDbId(),
- s -> new SchedException(Status.UNRECOVERABLE, "db " +
tabletCtx.getDbId() + " does not exist"));
- OlapTable tbl = (OlapTable)
db.getTableOrException(tabletCtx.getTblId(),
- s -> new SchedException(Status.UNRECOVERABLE, "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, "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]