Skip to content

Commit

Permalink
tiny change
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Feb 13, 2023
1 parent 2529934 commit 12b0d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion placement-rules-in-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ PARTITION BY RANGE( YEAR(purchased) ) (

``` sql
CREATE PLACEMENT POLICY multiaz SURVIVAL_PREFERENCES="[zone, host]";
CREATE PLACEMENT POLICY singleaz CONSTRAINTS="[+zone=zone1]" SURVIVAL_PREFERENCES="[rack]";
CREATE PLACEMENT POLICY singleaz CONSTRAINTS="[+zone=zone1]" SURVIVAL_PREFERENCES="[host]";
```

对于以上例子,绑定了 `multiaz` 该放置策略的表,会以 3 副本的形式放置在不同的可用区里, 数据会先优先满足跨 `zone`(即可用区)级别数据隔离的生存目标,再满足跨 `host`(即机器)级别的数据隔离的生存目标;应用了 `singleaz` 放置策略的数据,会以 3 副本的形式放置在名为 `zone1` 这个可用区里, 再满足跨 `host`(即机器)级别的数据隔离的生存目标。
Expand Down

0 comments on commit 12b0d10

Please sign in to comment.