You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/04/21 16:25:15 UTC
[GitHub] [shardingsphere] strongduanmu opened a new pull request #5256: update the configuration of `inline` sharding algorithm
strongduanmu opened a new pull request #5256:
URL: https://github.com/apache/shardingsphere/pull/5256
Fixes #5234 .
Changes proposed in this pull request:
- update the configuration of `inline` sharding algorithm for sharding spring namespace
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #5256: update the configuration of `inline` sharding algorithm
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5256:
URL: https://github.com/apache/shardingsphere/pull/5256#issuecomment-617521467
@strongduanmu
Hi, you can always get my point, this PR is good, and just a bit comment needs your attention, thx.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #5256: update the configuration of `inline` sharding algorithm
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #5256:
URL: https://github.com/apache/shardingsphere/pull/5256#issuecomment-617539053
> @strongduanmu
> Hi, you can always get my point, this PR is good, and just a bit comment needs your attention, thx.
@tristaZero Sorry for this, I will pay attention to these details next time. This problem has been fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on issue #5256: update the configuration of `inline` sharding algorithm
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #5256:
URL: https://github.com/apache/shardingsphere/pull/5256#issuecomment-617556241
@strongduanmu
Hi Thanks for rapid feedback. Each line of your beautiful code will present yourself to the whole Apache community. :)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] tristaZero commented on a change in pull request #5256: update the configuration of `inline` sharding algorithm
Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #5256:
URL: https://github.com/apache/shardingsphere/pull/5256#discussion_r412631376
##########
File path: sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-namespace/src/test/resources/META-INF/rdb/withNamespaceForMasterSlaveWithStrategyType.xml
##########
@@ -19,18 +19,39 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+ xmlns:spi="http://shardingsphere.apache.org/schema/shardingsphere/spi"
+ xmlns:bean="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/sharding
http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+ http://shardingsphere.apache.org/schema/shardingsphere/spi
+ http://shardingsphere.apache.org/schema/shardingsphere/spi/spi.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
">
<import resource="datasource/masterSlaveDataSource.xml" />
<import resource="datasource/dataSource.xml" />
- <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="dbtbl_${user_id % 2}" />
- <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 4}" />
- <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 4}" />
-
+ <spi:sharding-algorithm id="databaseStrategyShardingAlgorithm" type="INLINE" props-ref="databaseProps"/>
+ <spi:sharding-algorithm id="orderTableStrategyShardingAlgorithm" type="INLINE" props-ref="orderTableProps"/>
+ <spi:sharding-algorithm id="orderItemTableStrategyShardingAlgorithm" type="INLINE" props-ref="orderItemTableProps"/>
+
+
Review comment:
One blank line is enough, please delete either of them.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #5256: update the configuration of `inline` sharding algorithm
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on a change in pull request #5256:
URL: https://github.com/apache/shardingsphere/pull/5256#discussion_r412645816
##########
File path: sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-namespace/src/test/resources/META-INF/rdb/withNamespaceForMasterSlaveWithStrategyType.xml
##########
@@ -19,18 +19,39 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sharding="http://shardingsphere.apache.org/schema/shardingsphere/sharding"
+ xmlns:spi="http://shardingsphere.apache.org/schema/shardingsphere/spi"
+ xmlns:bean="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/sharding
http://shardingsphere.apache.org/schema/shardingsphere/sharding/sharding.xsd
+ http://shardingsphere.apache.org/schema/shardingsphere/spi
+ http://shardingsphere.apache.org/schema/shardingsphere/spi/spi.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
">
<import resource="datasource/masterSlaveDataSource.xml" />
<import resource="datasource/dataSource.xml" />
- <sharding:inline-strategy id="databaseStrategy" sharding-column="user_id" algorithm-expression="dbtbl_${user_id % 2}" />
- <sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order_${order_id % 4}" />
- <sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item_${order_id % 4}" />
-
+ <spi:sharding-algorithm id="databaseStrategyShardingAlgorithm" type="INLINE" props-ref="databaseProps"/>
+ <spi:sharding-algorithm id="orderTableStrategyShardingAlgorithm" type="INLINE" props-ref="orderTableProps"/>
+ <spi:sharding-algorithm id="orderItemTableStrategyShardingAlgorithm" type="INLINE" props-ref="orderItemTableProps"/>
+
+
Review comment:
Ok, I will modify it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org