# 2021-10-25-11:22:01+0800 Adjust tikv pricing

- Cause:

There is a bug that an instance type can only have one price. Even
though the disk storage is different. So an instance type with another
pricing will override the existing price.

- Operation:

``` sql
select * from machine_profiles where instance_type = 'r5.2xlarge'; -- The machine_profile id is 547963
select * from regions where name = 'ap-northeast-1'; -- The region id is 118902
select * from region_machines where machine_profile_id = 547963 and region_id=118902; -- The region_machine id is 290027
select * from region_machine_prices where region_machine_id = 290027 order by effected_at;
-- Find the overridden prices and delete them to recover the old correct price
-- Refer the audit log from ops-portal
delete from region_machine_prices where id = 347353;
delete from region_machine_prices where id = 317347;
delete from region_machine_prices where id = 317348;
delete from region_machine_prices where id = 317350;
```

- Impact:
The price will be corrected

- Recovery operation:

Execute the following SQL command to revert the changes

- Time window:

2021-10-19 19:20 ~ 21:00 CST
