[
https://issues.apache.org/jira/browse/IGNITE-29299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ignite TC Bot updated IGNITE-29299:
-----------------------------------
Release Note: Thin client: Added server connection IDs to connection and
request monitoring events and diagnostic logs.
"Thin client: Added server connection IDs to connection and request monitoring
events and diagnostic logs."
The Release Note field has been filled with the wording above. Please review it
and edit it if needed.
> [Thin client] Expose server connection ID in handshake and monitoring events
> ----------------------------------------------------------------------------
>
> Key: IGNITE-29299
> URL: https://issues.apache.org/jira/browse/IGNITE-29299
> Project: Ignite
> Issue Type: Improvement
> Components: thin client
> Reporter: Vladislav Pyatkov
> Assignee: Vladislav Pyatkov
> Priority: Major
> Fix For: 2.20
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Ignite 2 exposes server-assigned connection IDs in SYS.CLIENT_CONNECTIONS and
> uses them in connection-management APIs, but thin clients do not receive this
> ID during handshake. This makes it difficult to correlate client-side request
> failures and reconnect events with server-side connections, especially behind
> NAT or TCP proxies.
> Return the existing server connection ID in the successful handshake response
> and expose it through the public Java thin-client ConnectionDescription API,
> connection/request monitoring events, and diagnostic logs. Keep the ID per
> channel so that events from the old and new connections remain
> distinguishable after reconnect.
> Proposed public API addition to
> org.apache.ignite.client.events.ConnectionDescription:
> {code:java}
> /**
> * Returns the server-assigned connection ID, matching SYS.CLIENT_CONNECTIONS.
> * Returns null before a successful handshake or if unsupported by the server.
> */
> @Nullable
> public Long connectionId();
> {code}
> Example usage after the change:
> {code:java}
> configuration.setEventListeners(new ConnectionEventListener() {
> @Override
> public void onHandshakeSuccess(HandshakeSuccessEvent event) {
> ConnectionDescription connection = event.connectionDescription();
> log.info("Ignite connection opened: nodeId={}, connectionId={}",
> connection.serverNodeId(), connection.connectionId());
> }
> });
> {code}
> The same ID should be available through connectionDescription() in
> ConnectionClosedEvent and request monitoring events, including
> RequestFailEvent, so applications can log nodeId, connectionId and requestId
> together. Include the ID in standard client diagnostic logs as well.
> Negotiate support with a protocol feature flag to preserve compatibility with
> older clients and servers.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)