Closed
Description
We should handle the below scene:
create policy p1 primary_region='r1' regions='r1,r2';
create table t (id int) placement policy p1;
drop table t;
drop table p1;
-- or create a new policy with a same name p1 here
recover table t;
show create table t; -- should t still referring a policy p1 ?
Maybe there are two solutions:
- recover all table's placement as direct options. For example,
show create table t
will return the result as:
CREATE TABLE `t1` (
`id` int(11) DEFAULT NULL
) /*T![placement] PRIMARY_REGION="r1" REGIONS="r1,r2" */
- Fails if meta not match. It will check if the policy with the same ID exists when recovering, if not, it fails. Notice that we can set sys variable
placement_checks
tofalse
to skip checking. At this time if the policy p1 does not exists (or with a different id) , it will recover a table without any placement settings.
Metadata
Assignees
Labels
No labels