// If a key affected by a local transaction has a new owner, we must add the new owner to the transaction's
// affected nodes set, so that the it receives the commit/rollback command. See ISPN-3389.
if(tx instanceof LocalTransaction) {
LocalTransaction localTx = (LocalTransaction) tx;
localTx.locksAcquired(Collections.singleton(destination));
if (trace) log.tracef("Adding affected node %s to transferred transaction %s (keys %s)", destination,
tx.getGlobalTransaction(), filteredLockedKeys);
}
transactionsToTransfer.add(new TransactionInfo(tx.getGlobalTransaction(), tx.getTopologyId(),
modifications, filteredLockedKeys));