[
https://issues.apache.org/jira/browse/IGNITE-11258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776766#comment-16776766
]
Alexander Lapin commented on IGNITE-11258:
------------------------------------------
[~vozerov] all fixed, ready for preliminary review.
However there's at least one open question. What is sufficient way to return
random (if we need random) connection from map?
{code:java}
/**
* @return Ignite endpoint to use for request/response transferring.
*/
private JdbcThinTcpIo cliIo() {
if (txStickyIo != null)
return txStickyIo;
// TODO: 15.02.19 probably we need better performance here.
Object[] vals = nodeToConnMap.values().toArray();
return (JdbcThinTcpIo)vals[RND.nextInt(vals.length)];
}
{code}
> JDBC Thin: update connection setup logic.
> -----------------------------------------
>
> Key: IGNITE-11258
> URL: https://issues.apache.org/jira/browse/IGNITE-11258
> Project: Ignite
> Issue Type: Task
> Components: jdbc
> Reporter: Alexander Lapin
> Assignee: Alexander Lapin
> Priority: Major
> Labels: iep-23
> Fix For: 2.8
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> # On thin client startup it connects to *all* *nodes* provided by user by
> client configuration.
> # Upon handshake server returns its UUID to client.
> # By the end of the startup procedure, client have open connections to all
> available server nodes and the following mapping (*nodeMap*): [UUID =>
> Connection].
> Connection to all nodes helps to identify available nodes, but can lead to
> significant delay, when thin client is used on a large cluster with a long IP
> list provided by user. To lower this delay, asynchronous establishment of
> connections can be used.
> For more information see [IEP-23: Best Effort
> Affinity|https://cwiki.apache.org/confluence/display/IGNITE/IEP-23%3A+Best+Effort+Affinity+for+thin+clients]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)