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 2022/10/10 06:40:36 UTC
[GitHub] [shardingsphere] vincentlbh opened a new issue, #18093: ShardingSphereAlgorithmPostProcessor.init() not called
vincentlbh opened a new issue, #18093:
URL: https://github.com/apache/shardingsphere/issues/18093
## Question
I was using Shardingsphere-jdbc(5.1.1).
![图片](https://user-images.githubusercontent.com/106581161/171118968-e91bde08-ce95-48ec-abee-fdbde503b499.png)
![图片](https://user-images.githubusercontent.com/106581161/171119722-00203db1-6a61-49a3-a95c-504ea626ac5d.png)
but ShardingSphereAlgorithmPostProcessor.init() was never called! is there something wrong?
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1159479684
The class `ShardingSphereAlgorithmPostProcessor` is renamed in 5.1.3, is the problem still existed?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143153242
I can't reproduce this problem, Maybe you can provide a demo project?
```
spring.shardingsphere.datasource.names=ds-0,ds-1
spring.shardingsphere.datasource.ds-0.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
spring.shardingsphere.datasource.ds-0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds-0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds-0.username=root
spring.shardingsphere.datasource.ds-0.password=123456
spring.shardingsphere.datasource.ds-1.jdbc-url=jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
spring.shardingsphere.datasource.ds-1.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds-1.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds-1.username=root
spring.shardingsphere.datasource.ds-1.password=123456
spring.shardingsphere.rules.sharding.database-strategy.standard.sharding-column=user_id
spring.shardingsphere.rules.sharding.database-strategy.standard.sharding-algorithm-name=database-inline
spring.shardingsphere.rules.sharding.binding-tables[0]=t_order,t_order_item
spring.shardingsphere.rules.sharding.broadcast-tables=t_address
spring.shardingsphere.rules.sharding.tables.t_order.actual-data-nodes=ds-$->{0..1}.t_order_$->{0..1}
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=t-order-class-based
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.column=order_id
spring.shardingsphere.rules.sharding.tables.t_order.key-generate-strategy.key-generator-name=snowflake
spring.shardingsphere.rules.sharding.tables.t_order_item.actual-data-nodes=ds-$->{0..1}.t_order_item_$->{0..1}
spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-column=order_id
spring.shardingsphere.rules.sharding.tables.t_order_item.table-strategy.standard.sharding-algorithm-name=t-order-item-class-based
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.column=order_item_id
spring.shardingsphere.rules.sharding.tables.t_order_item.key-generate-strategy.key-generator-name=snowflake
#spring.shardingsphere.rules.sharding.sharding-algorithms.datasource-class-based.type=CLASS_BASED
#spring.shardingsphere.rules.sharding.sharding-algorithms.datasource-class-based.props.strategy=standard
#spring.shardingsphere.rules.sharding.sharding-algorithms.datasource-class-based.props.algorithmClassName=org.apache.shardingsphere.example.extension.classbased.sharding.spring.boot.mybatis.fixture.ClassBasedDatasourceStandardShardingAlgorithmFixture
spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.database-inline.props.algorithm-expression=ds-$->{user_id % 2}
spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-class-based.type=CLASS_BASED
spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-class-based.props.strategy=standard
spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-class-based.props.algorithmClassName=com.lingh.service.ClassBasedOrderStandardShardingAlgorithmFixture
spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-class-based.props.sharding-count=2
spring.shardingsphere.rules.sharding.sharding-algorithms.t-order-item-class-based.type=CLASS_BASED
spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
spring.shardingsphere.props.sql-show=true
```
<img width="1752" alt="image" src="https://user-images.githubusercontent.com/33742097/171338332-8e3877b8-e388-4d02-bdeb-00c6921862c9.png">
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1272349698
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143174589
>
yeah,i got this
trationDelegate$BeanPostProcessorChecker : Bean 'tb-algorithm' of type [org.apache.shardingsphere.sharding.algorithm.sharding.classbased.ClassBasedShardingAlgorithm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] closed issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
URL: https://github.com/apache/shardingsphere/issues/18093
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142054826
> Can you provide your configuration with text format?
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1159918969
> The class `ShardingSphereAlgorithmPostProcessor` is renamed in 5.1.3, is the problem still existed?
When will 5.1.3 be released?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1141882928
Can you provide your configuration with text format?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143196400
>
Thx, i will see
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142053811
>
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN closed issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
TeslaCN closed issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
URL: https://github.com/apache/shardingsphere/issues/18093
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143194900
> I can't reproduce this problem, Maybe you can provide a demo project?
please take it!
[order-demo.zip](https://github.com/apache/shardingsphere/files/8811789/order-demo.zip)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143209577
[order-demo.zip](https://github.com/apache/shardingsphere/files/8811899/order-demo.zip)
@vincentlbh Can you use this project try it again?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142058693
> Can you provide your configuration with text format?
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142055548
> Can you provide your configuration with text format?
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1364910785
Please integrate ShardingSphere with Spring Boot in new way.
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143175256
> I have also encountered a similar problem, which may be affected by the loading order of different beans in the project. You can observe whether there is a similar log:
>
> ```
> is not eligible for getting processed by all BeanPostProcessors.
> ```
yeah,i got this
trationDelegate$BeanPostProcessorChecker : Bean 'tb-algorithm' of type [org.apache.shardingsphere.sharding.algorithm.sharding.classbased.ClassBasedShardingAlgorithm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143217798
> > [order-demo.zip](https://github.com/apache/shardingsphere/files/8811899/order-demo.zip)
> > @vincentlbh Can you use this project try it again?
>
> oh, sorry, i forgot something, earlier i had to add this class to solve that problem.
>
> ![图片](https://user-images.githubusercontent.com/106581161/171350552-964f2990-a6b8-47dd-938c-dacb37bdd88d.png)
I found it, and i commented it out
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143215312
> [order-demo.zip](https://github.com/apache/shardingsphere/files/8811899/order-demo.zip)
>
> @vincentlbh Can you use this project try it again?
oh, sorry, i forgot something, earlier i had to add this class to solve that problem.
![图片](https://user-images.githubusercontent.com/106581161/171350552-964f2990-a6b8-47dd-938c-dacb37bdd88d.png)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143141488
I have also encountered a similar problem, which may be affected by the loading order of different beans in the project. You can observe whether there is a similar log:
```
is not eligible for getting processed by all BeanPostProcessors.
```
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] zjcnb commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1143217599
>
I found it, and i commented it out
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1141876115
![图片](https://user-images.githubusercontent.com/106581161/171137583-da19438c-53a7-4250-8983-dd2b56eb6c44.png)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142052688
>
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] vincentlbh commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
vincentlbh commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1142054400
> Can you provide your configuration with text format?
spring:
shardingsphere:
datasource:
names: orderdemo0,orderdemo1
orderdemo0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo0?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}1
orderdemo1:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://10.126.124.51:3306/order_demo1?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
username: root
password: root
hikari:
auto-commit: true
connection-test-query: SELECT 1
connection-timeout: 9000
idle-timeout: 600000
max-lifetime: 1800000
maximum-pool-size: 15
minimum-idle: 10
pool-name: ${spring.application.name}2
rules:
sharding:
tables:
order_info:
actual-data-nodes: orderdemo$->{0..1}.order_info$->{0..1}
database-strategy:
standard:
sharding-column: order_id
sharding-algorithm-name: db-algorithm
table-strategy:
standard:
sharding-column: user_id
sharding-algorithm-name: tb-algorithm
sharding-algorithms:
db-algorithm:
type: INLINE
props:
algorithm-expression: orderdemo$->{order_id % 2}
tb-algorithm:
# type: INLINE
# props:
# algorithm-expression: order_info$->{user_id % 2}
type: CLASS_BASED
props:
strategy: standard
algorithmClassName: com.tcl.sharding.order.infrastructure.algorithm.OrderAlgorithm
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] mumutu66 commented on issue #18093: ShardingSphereAlgorithmPostProcessor.init() not called
Posted by GitBox <gi...@apache.org>.
mumutu66 commented on issue #18093:
URL: https://github.com/apache/shardingsphere/issues/18093#issuecomment-1221521809
I think the datasource bean may not use the beanPostProcessor to init。。In some case other lib will use a beanPostProcessor which depends on the datasource will trigger the bean initialize during the `org.springframework.context.support.PostProcessorRegistrationDelegate#registerBeanPostProcessors(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, org.springframework.context.support.AbstractApplicationContext)` and the datasource bean will missing the init phase . maybe use the `SmartInitializingSingleton` instead。。or just init right on the ` BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(ShardingSphereAlgorithmFactory.createAlgorithm(algorithmConfig, algorithmClass).getClass());`
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org