ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] pavlukhin commented on a change in pull request #6595: IGNITE-11685 Java thin client: Handle multiple async requests in parallel
Date Thu, 04 Jul 2019 09:32:38 GMT
pavlukhin commented on a change in pull request #6595: IGNITE-11685 Java thin client: Handle
multiple async requests in parallel
URL: https://github.com/apache/ignite/pull/6595#discussion_r300280714
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ReliableChannel.java
 ##########
 @@ -80,32 +76,34 @@
 
         List<InetSocketAddress> addrs = parseAddresses(clientCfg.getAddresses());
 
+        srvCnt = addrs.size();
+
         primary = addrs.get(new Random().nextInt(addrs.size())); // we already verified there
is at least one address
 
         for (InetSocketAddress a : addrs) {
             if (a != primary)
-                this.backups.add(a);
+                backups.add(a);
         }
 
         ClientConnectionException lastEx = null;
 
         for (int i = 0; i < addrs.size(); i++) {
             try {
-                ch = chFactory.apply(new ClientChannelConfiguration(clientCfg).setAddress(primary)).get();
+                ch = chFactory.apply(new ClientChannelConfiguration(clientCfg).setAddress(addrs.get(i))).get();
 
 Review comment:
   Another point to think about. Why do we need to establish a connection eagerly on ReliableChannel/ThinClient
instance creation? Can we do it lazily?

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message