alex-plekhanov commented on code in PR #12925:
URL: https://github.com/apache/ignite/pull/12925#discussion_r3477052021
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java:
##########
@@ -3123,8 +3126,28 @@ private TxRecoveryInitRunnable(ClusterNode node) {
", failedNodeId=" + evtNodeId + ']');
for (final IgniteInternalTx tx : activeTransactions()) {
- if ((tx.near() && !tx.local() &&
tx.originatingNodeId().equals(evtNodeId))
- || (tx.storeWriteThrough() &&
tx.masterNodeIds().contains(evtNodeId))) {
+ Map<UUID, Collection<UUID>> txNodes =
tx.transactionNodes();
+
+ if (tx.storeWriteThrough() && txNodes != null
+ && tx.near() && txNodes.containsKey(evtNodeId)
+ && (tx.state() == PREPARING || tx.state() == PREPARED
+ || tx.state() == COMMITTING || tx.state() ==
COMMITTED)) {
+ // Send a message, tx is applied on near node and can
be processed on backup if postponed.
+ sendTxSalvage(tx, evtNodeId);
+ }
+
+ Supplier<Boolean> fullSyncedOp = () ->
tx.writeEntries().stream().map(e ->
+
cctx.cacheContext(e.cacheId())).allMatch(GridCacheContext::syncCommit);
Review Comment:
According to IgniteTxStateImpl#syncMode mode is FULL_SYNC if any of caches
have FULL_SYNC mode. Instead of entries iterator we can iterate over active
cache ids (txState().cacheIds()). Maybe it's better ti reuse
IgniteTxStateImpl#syncMode somehow, but there is `assert false` in
IgniteTxRemoteStateAdapter
--
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]