Skip to content

Commit

Permalink
modify data property of partition to be HDD when migration happens
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Apr 24, 2022
1 parent 3a70112 commit 46c4f1a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4995,7 +4995,8 @@ public HashMap<Long, TStorageMedium> getPartitionIdToStorageMediumMap() {
if (dataProperty.getStorageMedium() == TStorageMedium.SSD
&& dataProperty.getCooldownTimeMs() < currentTimeMs) {
// expire. change to HDD.
partitionInfo.setDataProperty(partition.getId(), new DataProperty(TStorageMedium.HDD));
DataProperty hddProp = new DataProperty(TStorageMedium.HDD);
partitionInfo.setDataProperty(partition.getId(), hddProp);
storageMediumMap.put(partitionId, TStorageMedium.HDD);
LOG.debug("partition[{}-{}-{}] storage medium changed from SSD to HDD",
dbId, tableId, partitionId);
Expand All @@ -5004,7 +5005,7 @@ public HashMap<Long, TStorageMedium> getPartitionIdToStorageMediumMap() {
ModifyPartitionInfo info =
new ModifyPartitionInfo(db.getId(), olapTable.getId(),
partition.getId(),
DataProperty.DEFAULT_DATA_PROPERTY,
hddProp,
ReplicaAllocation.NOT_SET,
partitionInfo.getIsInMemory(partition.getId()));
editLog.logModifyPartition(info);
Expand Down

0 comments on commit 46c4f1a

Please sign in to comment.