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 04:08:43 UTC

[GitHub] [doris] morningman opened a new pull request, #13755: [fix](dynamic-partition) fix wrong check of replication num

morningman opened a new pull request, #13755:
URL: https://github.com/apache/doris/pull/13755

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   The following stmt will return error:
   `errCode = 2, detailMessage = Failed to find 3 backends for policy: cluster|query|load|schedule|tags|medium: default_cluster|false|false|true|[{"location" : "default"}]|null`
   
   ```
   CREATE TABLE if not exists `tbl1` (
   `uuid` varchar(255),
   `part` date,
   )
   DUPLICATE KEY(uuid)
   PARTITION BY RANGE(part)()
   DISTRIBUTED BY HASH(uuid) BUCKETS 32
   PROPERTIES
   (
   "default_storage_medium" = "HDD",
   "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.create_history_partition"="true",
   "dynamic_partition.start" = "-3"
   );
   ```
   
   This PR fix it.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [doris] hello-stephen commented on pull request #13755: [fix](dynamic-partition) fix wrong check of replication num

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #13755:
URL: https://github.com/apache/doris/pull/13755#issuecomment-1295149417

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 39.06 seconds
    load time: 573 seconds
    storage size: 17154709880 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221028153938_clickbench_pr_35501.html


-- 
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


[GitHub] [doris] yiguolei merged pull request #13755: [fix](dynamic-partition) fix wrong check of replication num

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #13755:
URL: https://github.com/apache/doris/pull/13755


-- 
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


[GitHub] [doris] hello-stephen commented on pull request #13755: [fix](dynamic-partition) fix wrong check of replication num

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #13755:
URL: https://github.com/apache/doris/pull/13755#issuecomment-1294463959

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 38.2 seconds
    load time: 568 seconds
    storage size: 17154655323 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221028130831_clickbench_pr_35145.html


-- 
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