You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "Vladsz83 (via GitHub)" <gi...@apache.org> on 2025/12/10 16:39:52 UTC
[PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Vladsz83 opened a new pull request, #12572:
URL: https://github.com/apache/ignite/pull/12572
(no comment)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "Vladsz83 (via GitHub)" <gi...@apache.org>.
Vladsz83 commented on PR #12572:
URL: https://github.com/apache/ignite/pull/12572#issuecomment-3675516746
> @Vladsz83 , it is necessary to resolve conflicts.
Done
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja commented on code in PR #12572:
URL: https://github.com/apache/ignite/pull/12572#discussion_r2643422862
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java:
##########
@@ -739,13 +739,18 @@ private static void sleepEx(long millis, Runnable before, Runnable after) throws
TcpDiscoveryHandshakeResponse res = spi.readMessage(ses, ackTimeout0);
- if (res.redirectAddresses() != null) {
+ // Convert the addresses once.
+ Collection<InetSocketAddress> redirectAddrs = res.redirectAddresses();
+
+ if (redirectAddrs != null) {
U.closeQuiet(sock);
if (log.isInfoEnabled())
- log.info("Reconnecting to the addresses of a proper DC [addrs=" + res.redirectAddresses() + ']');
+ log.info("Reconnecting to the addresses of a proper DC [addrs=" + redirectAddrs + ']');
+
+ T2<Boolean, T2<SocketStream, Integer>> redirectedRes = sendJoinRequests(recon, redirectAddrs);
- T2<Boolean, T2<SocketStream, Integer>> redirectedRes = sendJoinRequests(recon, res.redirectAddresses());
+ //redirectAddrs.clear();
Review Comment:
To remove
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja merged PR #12572:
URL: https://github.com/apache/ignite/pull/12572
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #12572:
URL: https://github.com/apache/ignite/pull/12572#issuecomment-3686916686
## [](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12572) **Quality Gate failed**
Failed conditions
 [2 New Code Smells](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12572) (required ≤ 1)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_ignite&pullRequest=12572)
##
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja commented on code in PR #12572:
URL: https://github.com/apache/ignite/pull/12572#discussion_r2635468421
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryHandshakeResponse.java:
##########
@@ -87,13 +110,57 @@ public void order(long order) {
}
/** @return Socket addresses list for redirect. */
- @Nullable public Collection<InetSocketAddress> redirectAddresses() {
- return redirectAddresses;
+ public @Nullable Collection<InetSocketAddress> redirectAddresses() {
+ return redirectAddrs;
+ }
+
+ /** @param sockAddrs Socket addresses list for redirect. */
+ public void redirectAddresses(@Nullable Collection<InetSocketAddress> sockAddrs) {
+ redirectAddrs = sockAddrs;
+ }
+
+ /** @return Collection of {@link InetAddressMessage}. */
+ public @Nullable Collection<InetAddressMessage> redirectAddressesMessages() {
Review Comment:
I suggest to move such trasformations to corresponding methods, which applies `InetSocketAddress` collections.
See my suggestion above.
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryHandshakeResponse.java:
##########
@@ -55,17 +78,17 @@ public TcpDiscoveryHandshakeResponse(UUID creatorNodeId, long locNodeOrder) {
* @return previous node alive flag.
*/
public boolean previousNodeAlive() {
- return getFlag(CHANGE_TOPOLOGY_FLAG_POS);
Review Comment:
`CHANGE_TOPOLOGY_FLAG_POS` can be safely removed now.
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryHandshakeResponse.java:
##########
@@ -87,13 +110,57 @@ public void order(long order) {
}
/** @return Socket addresses list for redirect. */
- @Nullable public Collection<InetSocketAddress> redirectAddresses() {
- return redirectAddresses;
+ public @Nullable Collection<InetSocketAddress> redirectAddresses() {
+ return redirectAddrs;
Review Comment:
```suggestion
return F.isEmpty(redirectAddrsMsgs) ? null :
F.transform(redirectAddrsMsgs, msg -> {
try {
return new InetSocketAddress(msg.address(), msg.port());
}
catch (UnknownHostException e) {
throw new IgniteException("Failed to read host address.", e);
}
});
```
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryHandshakeResponse.java:
##########
@@ -87,13 +110,57 @@ public void order(long order) {
}
/** @return Socket addresses list for redirect. */
- @Nullable public Collection<InetSocketAddress> redirectAddresses() {
- return redirectAddresses;
+ public @Nullable Collection<InetSocketAddress> redirectAddresses() {
+ return redirectAddrs;
+ }
+
+ /** @param sockAddrs Socket addresses list for redirect. */
+ public void redirectAddresses(@Nullable Collection<InetSocketAddress> sockAddrs) {
+ redirectAddrs = sockAddrs;
Review Comment:
```suggestion
redirectAddrsMsgs = sockAddrs == null ? null :
F.viewReadOnly(sockAddrs, addr -> new InetAddressMessage(addr.getAddress(), addr.getPort()));
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja commented on code in PR #12572:
URL: https://github.com/apache/ignite/pull/12572#discussion_r2635599908
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryHandshakeResponse.java:
##########
@@ -111,41 +107,33 @@ public void order(long order) {
/** @return Socket addresses list for redirect. */
public @Nullable Collection<InetSocketAddress> redirectAddresses() {
Review Comment:
Method is used several times in one place in ClientImpl. We can copy collection in ClientImpl.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-27316 : Use MessageSerializer for TcpDiscoveryHandshakeResponse [ignite]
Posted by "shishkovilja (via GitHub)" <gi...@apache.org>.
shishkovilja commented on PR #12572:
URL: https://github.com/apache/ignite/pull/12572#issuecomment-3675496307
@Vladsz83 , it is necessary to resolve conflicts.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org