Hi Terry,

Thanks for your update.


I want to make sure whether your sharding configuration contains the item, 
i.e., `defaultDataSourceName`?
Our master branch has optimized the loading process of metaData for tables 
positioning in `defaultDataSource`. Based on that, if your team did not 
configure `defaultDataSourceName`, no significant improvement is expected.
However, we are still working on this issue to find a better way. So you can 
watch ISSUE[1] and wait for our update.


Cheer,
Trista


[1] https://github.com/apache/incubator-shardingsphere/issues/4604




 Juan Pan (Trista)
                         
Senior DBA & PPMC of Apache ShardingSphere(Incubating)
E-mail: panj...@apache.org




On 03/8/2020 20:07??Terry Zhang<conf...@qq.com> wrote??
Dear team,&nbsp;


Let me update our test result for the version of branch 'master'.


The result is as following:
Disable "check.table.metadata.enabled" : 78.9s elapsed, please check 
below.&nbsp;
"2020-03-06 19:09:18.951 [main] INFO  ShardingSphere-MetaData - Meta data 
loading finished, cost 78982 milliseconds."


However, when we enable "check.table.metadata.enabled", an exception was 
thrown, it promoted that a bean is not initialised successfully as we are using 
Spring Cloud, we will look into it when we are free later.


Based on above, we don't think the version under branch 'master' is making a 
significant improvement on this.&nbsp;


Thanks.&nbsp;
Regards.&nbsp;
Terry Zhang






------------------&nbsp;????????&nbsp;------------------
??????:&nbsp;"KimmKing"<kimmk...@apache.org&gt;;
????????:&nbsp;2020??3??8??(??????) ????1:57
??????:&nbsp;"dev"<dev@shardingsphere.apache.org&gt;;

????:&nbsp;Re:Re:Re:Too slow to launch the service once ShardingJDBC is adopted



Good job.
And I will follow this issue.
Once your team complete the test, we will consider a further improvement of 
this issue.



?? 2020-03-06 13:21:51??"Terry Zhang" <conf...@qq.com&gt; ??????
&gt;SURE, I will have team test it ASAP.&amp;nbsp; Thanks.
&gt;
&gt;Best Regards
&gt;
&gt;Terry Zhang
&gt;
&gt;
&gt;------------------ ???????? ------------------
&gt;??????:&amp;nbsp;"Juan Pan" <panj...@apache.org&amp;gt;;
&gt;????????:&amp;nbsp;2020??3??6??(??????) 11:44
&gt;??????:&amp;nbsp;"dev@shardingsphere.apache.org" 
<dev@shardingsphere.apache.org&amp;gt;;
&gt;????:&amp;nbsp;"dev" <dev@shardingsphere.apache.org&amp;gt;;
&gt;????:&amp;nbsp;Re:Too slow to launch the service once ShardingJDBC is 
adopted
&gt;
&gt;
&gt;
&gt;Hi Terry,
&gt;
&gt;
&gt;Appreciated your detailed report.
&gt;Currently, the option `check.table.metadata.enabled` is the best way to 
speed up launching. However much feedback from community
&gt;made us consider to optimize it ASAP. Could i invite you to join us to make 
it better, even just an assisted test for this new enhancement is a help.
&gt;I will update progress on ISSSUE[1], which you can refer to for learning 
more.
&gt;
&gt;
&gt;Cheers,
&gt;Trista
&gt;
&gt;
&gt;
&gt;
&gt;[1] https://github.com/apache/incubator-shardingsphere/issues/4604
&gt;
&gt;
&gt;&amp;nbsp;Juan Pan (Trista)
&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&gt;Senior DBA &amp;amp; PPMC of Apache ShardingSphere(Incubating)
&gt;E-mail: panj...@apache.org
&gt;
&gt;
&gt;
&gt;
&gt;On 03/5/2020 21:04??Terry Zhang<conf...@qq.com&amp;gt; wrote??
&gt;Dear ShardingSphere team,&amp;amp;nbsp;
&gt;
&gt;
&gt;We are using ShardingJDBC module in our project and running well for in 
prod environment. However, we are encountering a serious issue of that once 
ShardingJDBC is integrated within our project it can take us 1+ minutes to 
launch the service in our dev/test/prod environment. You know it is so slow 
resulting in our bad work efficiency in both dev/test and prod environment as 
we have to wait for its launch every time.
&gt;
&gt;
&gt;Due to demonstration above, we try to resolve this issue by ourselves, and 
move forward to this project's official website to find the resolution. 
Finally, we found the config item "check.table.metadata.enabled" via the web 
page&amp;amp;nbsp;
&gt;https://shardingsphere.apache.org/document/legacy/3.x/document/en/manual/sharding-jdbc/configuration/config-yaml/.
 Unfortunately, we gain a negative result after our trial.
&gt;
&gt;
&gt;Below is our test result:
&gt;---------------------------
&gt;ShardingJDBC: 4.0.0 RC3
&gt;JDK: 1.8
&gt;Database: MySQL 5.7.25&amp;amp;nbsp;
&gt;Tables:&amp;amp;nbsp; totally 465 tables, including 132 sharding tables
&gt;Enable "check.table.metadata.enabled" : about 139s elapsed.
&gt;Disable "check.table.metadata.enabled" : about 80s elapsed.
&gt;---------------------------
&gt;I attached the test log for your reference at the bottom of this email.
&gt;
&gt;
&gt;In summary, although we set the prop to false, it still consume about 80s, 
that is too low for us. I can??t confirm whether the prop is corrected, if no, 
please advise which one is corrected or is there other solution? Your advice is 
appreciated. Looking forward to your reply. Thanks.&amp;amp;nbsp;
&gt;
&gt;
&gt;Rgds, Terry Zhang
&gt;
&gt;
&gt;------------TEST LOG ATTACHED--------
&gt;
&gt;
&gt;With prop "check.table.metadata.enabled = true"
&gt;
&gt;
&gt;2020-03-05 17:10:17.390 [main] INFO&amp;amp;nbsp; 
o.a.s.core.util.ConfigurationLogger - Properties
&gt;check.table.metadata.enabled: true
&gt;
&gt;
&gt;2020-03-05 17:12:09.394 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'shardingDataSource' of type 
[org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.ShardingDataSource]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
&gt;2020-03-05 17:12:09.402 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of 
type 
[org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$f1ce2b62]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
&gt;2020-03-05 17:12:09.439 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties'
 of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is 
not eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
&gt;2020-03-05 17:12:09.457 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'dataSourceInitializer' of type 
[org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not 
eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
&gt;2020-03-05 17:12:09.467 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration'
 of type 
[org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration$$EnhancerBySpringCGLIB$$a44e830c]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
&gt;
&gt;
&gt;
&gt;
&gt;With prop "check.table.metadata.enabled = false"
&gt;
&gt;
&gt;2020-03-05 17:12:51.295 [main] INFO&amp;amp;nbsp; 
o.a.s.core.util.ConfigurationLogger - Properties
&gt;check.table.metadata.enabled: false
&gt;2020-03-05 17:14:12.015 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'shardingDataSource' of type 
[org.apache.shardingsphere.shardingjdbc.jdbc.core.datasource.ShardingDataSource]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
&gt;2020-03-05 17:14:12.022 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of 
type 
[org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$37874c71]
 is not eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
&gt;2020-03-05 17:14:12.058 [main] INFO&amp;amp;nbsp; 
o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 
'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties'
 of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is 
not eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)

Reply via email to