[
https://issues.apache.org/jira/browse/IGNITE-11671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825935#comment-16825935
]
Amelchev Nikita commented on IGNITE-11671:
------------------------------------------
I prepared a PR to fix this issue.
Connection id (long) consists of two 32-bits parts:
1. Node order (first part 32-bits)
2. Unique identifier (int)
I removed node order and make unique identifier long type.
Node order was used only for assertion on dropping a connection. Moreover, this
assertion fails after 2^31 attempts to connect.
If node order using to generate unique connection id per cluster and 2^31 is ok
(24 days with 1ms attempt to connect), I will rework fix to wait for local node
initialized. Another way is to revisit the generation of connection id (For
example, extend it to uuid).
[~amashenkov], I see that you author of this feature. Could you take a look,
please?
> Thin client: Client may hang when connected to a starting server
> ----------------------------------------------------------------
>
> Key: IGNITE-11671
> URL: https://issues.apache.org/jira/browse/IGNITE-11671
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Reporter: Aleksey Plekhanov
> Assignee: Amelchev Nikita
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If the server start process has not completed yet, but NIO listeners already
> started, the client may never get a response for the handshake request.
> Exception on the server-side:
>
> {noformat}
> [client-connector-#6416%f3b837aa-d726-46b0-a58b-8cc6267c9f96%][ClientListenerProcessor]
> Runtime error caught during grid runnable execution: GridWorker
> [name=message-received-notify,
> igniteInstanceName=f3b837aa-d726-46b0-a58b-8cc6267c9f96, finished=false,
> heartbeatTs=1554209548706, hashCode=519781823, interrupted=false,
> runner=client-connector-#6416%f3b837aa-d726-46b0-a58b-8cc6267c9f96%]
> java.lang.NullPointerException
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.nextConnectionId(ClientListenerNioListener.java:334)
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.prepareContext(ClientListenerNioListener.java:313)
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onHandshake(ClientListenerNioListener.java:251)
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:132)
> at
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:48)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> at
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> at
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
> at
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70){noformat}
>
> This happens because NIO listeners start before {{GridDiscoveryManager}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)