kylinmac opened a new issue #8196:
URL: https://github.com/apache/incubator-doris/issues/8196


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   f227472db2d8ec207efac2fc144b08a969acb98f
   
   ### What's Wrong?
   
   没有配置SSD存储介质,建表的时候设置存储介质为SSD会报错
   ```
   mysql> create table test_storage (k1 BIGINT,k2 DATE,v1 varchar(20)) UNIQUE 
KEY(k1,k2) partition by RANGE(k2) ( partition
       -> p1 values less than ('2022-03-01')) DISTRIBUTED BY HASH(k1) BUCKETS 4 
PROPERTIES("replication_allocation" = "tag.location.default: 
1","storage_medium" = "SSD", "storage_cooldown_time" = "2022-06-04 00:00:00")
       -> ;
   ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to find enough host 
with storage medium and tag(SSD/{"location" : "default"}) in all backends. 
need: 1
   
   mysql>  create table test_storage (k1 BIGINT,k2 DATE,v1 varchar(20)) UNIQUE 
KEY(k1,k2) partition by RANGE(k2) ( partition
       -> p1 values less than ('2022-03-01')) DISTRIBUTED BY HASH(k1) BUCKETS 4 
PROPERTIES("replication_allocation" = "tag.location.default: 
1","storage_medium" = "HDD");
   Query OK, 0 rows affected (0.02 sec)
   
   mysql> alter table test_storage MODIFY PARTITION (p1) SET("storage_medium" = 
"SSD", "storage_cooldown_time" = "2022-06-04 00:00:00");
   Query OK, 0 rows affected (0.00 sec)
   ```
   但是修改分区的时候没有报错,成功改为SSD,通过这种方式,绕过了建表时的校验
   
   ### What You Expected?
   
   修改或添加分区时是不是也应该进行和建表时同样的校验
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to