You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/28 06:18:17 UTC

[GitHub] [doris] nextdreamblue commented on a diff in pull request #13755: [fix](dynamic-partition) fix wrong check of replication num

nextdreamblue commented on code in PR #13755:
URL: https://github.com/apache/doris/pull/13755#discussion_r1007681544


##########
docs/zh-CN/docs/advanced/partition/dynamic-partition.md:
##########
@@ -453,6 +453,87 @@ mysql> SHOW DYNAMIC PARTITION TABLES;
 
    这时候请修改 FE 的配置文件,增加一行 `dynamic_partition_enable=true`,并重启 FE。或者执行命令 ADMIN SET FRONTEND CONFIG ("dynamic_partition_enable" = "true") 将动态分区开关打开即可。
 
+2. 关于动态分区的副本设置
+
+    动态分区是由系统内部的调度逻辑自动创建的。在自动创建分区时,所使用的分区属性(包括分区的副本数等),都是单独使用 `dynamic_partition` 前缀的属性,而不是使用表的默认属性。举例说明:
+
+    ```
+    CREATE TABLE tbl1 (
+    `k1` int,
+    `k2` date
+    )
+    PARTITION BY RANGE(k2)()
+    DISTRIBUTED BY HASH(k1) BUCKETS 3
+    PROPERTIES
+    (
+    "dynamic_partition.enable" = "true",
+    "dynamic_partition.time_unit" = "DAY",
+    "dynamic_partition.end" = "3",
+    "dynamic_partition.prefix" = "p",
+    "dynamic_partition.buckets" = "32",
+    "dynamic_partition.replication_num" = "1",
+    "dynamic_partition.start" = "-3",
+    "replication_num" = "3"
+    );
+    ```
+
+    这个示例中,没有创建任何初始分区(PARTITION BY 子句中的分区定义为空),并且设置了 `DISTRIBUTED BY HASH(k1) BUCKETS 3`, `"replication_num" = "3"`, `"dynamic_partition.replication_num" = "1"` 和 `"dynamic_partition.buckets" = "32"`。
+
+    我们将前两个参数成为表的默认参数,而后两个参数成为动态分区专用参数。
+
+    当系统自动创爱分区时,会使用分桶数 32 和 副本数 1 这两个配置(即动态分区专用参数)。而不是分桶数 3 和 副本数 3 这两个配置。

Review Comment:
   ```suggestion
       当系统自动创建分区时,会使用分桶数 32 和 副本数 1 这两个配置(即动态分区专用参数)。而不是分桶数 3 和 副本数 3 这两个配置。
   ```



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org