terrymanu commented on a change in pull request #3165: Support time server 
database for issues 1497
URL: 
https://github.com/apache/incubator-shardingsphere/pull/3165#discussion_r330528344
 
 

 ##########
 File path: 
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/connection/BackendConnection.java
 ##########
 @@ -316,4 +321,45 @@ private void replayMethodsInvocation(final Object target) 
{
             each.invoke(target);
         }
     }
+
+    public Optional<Connection> getTimeServerConnection(){
+        String timeServerDataSourceName = logicSchema.getShardingRule()
+                .getShardingDataSourceNames().getTimeServerDataSourceName();
+        if (timeServerDataSourceName == null) {
+            timeServerDataSourceName = 
logicSchema.getShardingRule().getShardingDataSourceNames().getDefaultDataSourceName();
+        }
+        try {
+            Connection connection = timeServerDataSourceName == null
 
 Review comment:
   null should be front of variable in null judgement expression

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to