Skip to content

Commit d2bb726

Browse files
committed
fix
1 parent b47be91 commit d2bb726

2 files changed

Lines changed: 18 additions & 14 deletions

File tree

modules/control-utility/src/test/java/org/apache/ignite/util/IdleVerifyCheckWithWriteThroughTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,6 @@ public void testTxCoordinatorLeftClusterWithEnabledReadWriteThrough() throws Exc
239239

240240
awaitPartitionMapExchange();
241241

242-
for (int nodeIdx : List.of(0, 2)) {
243-
IgniteEx g = grid(nodeIdx);
244-
IgniteCache<Object, Object> cacheInner = g.cache(DEFAULT_CACHE_NAME);
245-
waitForCondition(() -> secondVal == (int)cacheInner.get(primaryKey), 1_000);
246-
}
247-
248242
assertEquals(EXIT_CODE_OK, execute("--port", connectorPort(grid(2)), "--cache", "idle_verify"));
249243

250244
String out = testOut.toString();
@@ -264,6 +258,12 @@ public void testTxCoordinatorLeftClusterWithEnabledReadWriteThrough() throws Exc
264258
}
265259
testOut.reset();
266260

261+
for (int nodeIdx : List.of(0, 2)) {
262+
IgniteEx g = grid(nodeIdx);
263+
IgniteCache<Object, Object> cacheInner = g.cache(DEFAULT_CACHE_NAME);
264+
waitForCondition(() -> secondVal == (int)cacheInner.get(primaryKey), 1_000);
265+
}
266+
267267
if (withPersistence) {
268268
stopAllGrids();
269269
startGridsMultiThreaded(3);

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3219,15 +3219,19 @@ private void sendTxSalvage(IgniteInternalTx tx, UUID evtNodeId) {
32193219
if (tx.masterNodeIds().contains(nodeId))
32203220
continue;
32213221

3222-
if (salvageReq == null)
3223-
salvageReq = new GridDhtTxSalvageMessage(tx.nearXidVersion());
3222+
ClusterNode involvedNode = cctx.discovery().node(nodeId);
32243223

3225-
try {
3226-
cctx.io().send(nodeId, salvageReq, tx.ioPolicy());
3227-
}
3228-
catch (IgniteCheckedException e) {
3229-
log.warning("Failed to send salvage message [failedNodeId=" + evtNodeId +
3230-
", nodeId=" + nodeId + ']', e);
3224+
if (involvedNode != null && !involvedNode.isLocal()) {
3225+
if (salvageReq == null)
3226+
salvageReq = new GridDhtTxSalvageMessage(tx.nearXidVersion());
3227+
3228+
try {
3229+
cctx.io().send(nodeId, salvageReq, tx.ioPolicy());
3230+
}
3231+
catch (IgniteCheckedException e) {
3232+
log.warning("Failed to send salvage message [failedNodeId=" + evtNodeId +
3233+
", nodeId=" + nodeId + ']', e);
3234+
}
32313235
}
32323236
}
32333237
}

0 commit comments

Comments
 (0)