Skip to content

Commit 38b93f5

Browse files
committed
WIP
1 parent 016f4a3 commit 38b93f5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryCheckFailedMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void error(String err) {
6565

6666
/** {@inheritDoc} */
6767
@Override public short directType() {
68-
return -1000;
68+
return 0;
6969
}
7070

7171
/** {@inheritDoc} */

modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryCoordinatorFailureTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,22 @@ public void awaitDrop() throws InterruptedException, IgniteCheckedException {
284284
throw new IgniteCheckedException("Failed to wait for NodeAddFinishedMessage");
285285
}
286286

287+
/** {@inheritDoc} */
288+
@Override protected void writeToSocket(
289+
Socket sock,
290+
TcpDiscoveryAbstractMessage msg,
291+
byte[] data,
292+
long timeout
293+
) throws IOException {
294+
if (isDrop(msg)) {
295+
// Replace logic routine message with a stub to update last-sent-time to avoid segmentation on
296+
// connRecoveryTimeout.
297+
msg = new TcpDiscoveryConnectionCheckMessage(locNode);
298+
}
299+
300+
super.writeToSocket(sock, msg, data, timeout);
301+
}
302+
287303
/** {@inheritDoc} */
288304
@Override protected void writeToSocket(
289305
TcpDiscoveryIoSession ses,

0 commit comments

Comments
 (0)