zstan commented on code in PR #12663:
URL: https://github.com/apache/ignite/pull/12663#discussion_r2757783423
##########
modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java:
##########
@@ -3242,46 +3241,19 @@ private void
sendMessageToClients(TcpDiscoveryAbstractMessage msg) {
if (spi.ensured(msg))
msgHist.add(msg);
- byte[] msgBytes = null;
-
for (ClientMessageWorker clientMsgWorker :
clientMsgWorkers.values()) {
- if (msgBytes == null) {
- try {
- msgBytes =
clientMsgWorker.ses.serializeMessage(msg);
- }
- catch (IgniteCheckedException | IOException e) {
- U.error(log, "Failed to serialize message to a
client: " + msg + ", recepient " +
- "client id: " + clientMsgWorker.clientNodeId,
e);
-
- break;
- }
- }
-
- TcpDiscoveryAbstractMessage msg0 = msg;
- byte[] msgBytes0 = msgBytes;
-
if (msg instanceof TcpDiscoveryNodeAddedMessage) {
TcpDiscoveryNodeAddedMessage nodeAddedMsg =
(TcpDiscoveryNodeAddedMessage)msg;
- TcpDiscoveryNode node = nodeAddedMsg.node();
-
- if (clientMsgWorker.clientNodeId.equals(node.id())) {
- try {
- // TODO:
https://issues.apache.org/jira/browse/IGNITE-27556 refactor serialization.
- msg0 = U.unmarshal(spi.marshaller(), msgBytes,
-
U.resolveClassLoader(spi.ignite().configuration()));
-
- prepareNodeAddedMessage(msg0,
clientMsgWorker.clientNodeId, null);
+ if
(clientMsgWorker.clientNodeId.equals(nodeAddedMsg.node().id())) {
+ msg = new
TcpDiscoveryNodeAddedMessage(nodeAddedMsg);
Review Comment:
the same - it need to be logged into a mentioned issue
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]