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/10/12 06:58:04 UTC
[GitHub] [shardingsphere] johnny2002 opened a new pull request #7751: #7471 resolved
johnny2002 opened a new pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751
Fixes #7471
Changes proposed in this pull request:
datasources yaml changed to:
dataSources:
template1:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
username: root
password:
maximumPoolSize: 2
isTemplate: true #indicate this is a template, not a concrete datasource
ds_0:
template: template1 #inherit properties from datasource "template1"
jdbc-url: jdbc:h2:mem:core
maximumPoolSize: 5 #override values from template1
ds_1:
template: template1
jdbc-Url: jdbc:h2:mem:core
-
-
-
----------------------------------------------------------------
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] kimmking commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
kimmking commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709001939
@johnny2002 Can you change the title friendly for users?
----------------------------------------------------------------
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] kimmking closed pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
kimmking closed pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751
----------------------------------------------------------------
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 pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-708869989
@johnny2002 I guess `ds_$->{0..1}` can work as well. Have you ever tried 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
[GitHub] [shardingsphere] johnny2002 commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
johnny2002 commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709688792
> Hello, @johnny2002 thanks a lot for contribution.
> As a team discussion for configuration design, common configured parameters will be removed from current version.
> So, we need close this pr instead of merging it. Maybe someday we relaunch the common configration and template functionalities in our ecosystem projects.
> But now let's move on.
@kimmking One more thing I wanna remind you is that, the new template style datasource configuration also compatible with no template style. e.g. both the following styles are compatible.
``` yaml
dataSources:
template1:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
username: root
password:
maximumPoolSize: 2
isTemplate: true #indicate this is a template, not a concrete datasource
ds_0:
template: template1 #inherit properties from datasource "template1"
jdbc-url: jdbc:h2:mem:core
maximumPoolSize: 5 #override the value "2" from "template1"
ds_1:
template: template1
jdbc-Url: jdbc:h2:mem:core
```
or
```yaml
dataSources:
ds_0:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
username: root
password:
maximumPoolSize: 2
jdbc-url: jdbc:h2:mem:core
maximumPoolSize: 5 #override the value "2" from "template1"
ds_1:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: org.h2.Driver
username: root
password:
maximumPoolSize: 2
jdbc-Url: jdbc:h2:mem:core
```
----------------------------------------------------------------
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] johnny2002 commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
johnny2002 commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-708197539
@tristaZero
Another thing is, suggestion we don't use expression like "ds_${0..1}", instead, we can use "ds_$->{0..1}", so that to avoid spring placeholder.
----------------------------------------------------------------
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] kimmking commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
kimmking commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709053945
Hello, @johnny2002 thanks a lot for contribution.
As a team discussion for configuration design, common configured parameters will be removed from current version.
So, we need close this pr instead of merging it. Maybe someday we relaunch the common configration and template functionalities in our ecosystem projects.
But now let's move on.
----------------------------------------------------------------
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] kimmking commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
kimmking commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709001629
It seems a big issue. I will check it soon.
----------------------------------------------------------------
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] johnny2002 edited a comment on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
johnny2002 edited a comment on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-708197539
@tristaZero
Another thing is, suggest we don't use expressions like "ds_${0..1}", instead, we can use "ds_$->{0..1}", so that to avoid spring placeholder.
----------------------------------------------------------------
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] johnny2002 commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
johnny2002 commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709208353
> Hello, @johnny2002 thanks a lot for contribution.
> As a team discussion for configuration design, common configured parameters will be removed from current version.
> So, we need close this pr instead of merging it. Maybe someday we relaunch the common configration and template functionalities in our ecosystem projects.
> But now let's move on.
Understand, hope to contribute for the project in the future.
----------------------------------------------------------------
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 pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-707466465
Thanks for hard working, @johnny2002 It looks like a big change, please leave @kimmking some time to review. :)
----------------------------------------------------------------
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] kimmking commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
kimmking commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709967891
Thanks for reminding me.
----------------------------------------------------------------
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] johnny2002 commented on pull request #7751: #7471 resolved
Posted by GitBox <gi...@apache.org>.
johnny2002 commented on pull request #7751:
URL: https://github.com/apache/shardingsphere/pull/7751#issuecomment-709206619
> @johnny2002 I guess `ds_$->{0..1}` can work as well. Have you ever tried it?
@tristaZero YES, ds_$->{0..1} does work.
While I think we shall NOT support ds_${0..1}, I found in our source code, in order to support "ds_${0..1}", we have to change StandardEnvironment.ignoreUnresolvableNestedPlaceholders to true. This is not a good practice, since it will affect the whole application.
----------------------------------------------------------------
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