log.tracef("Cleaning local transactions with stale eager single node locks");
// roll back local transactions if their main data owner has changed
for (LocalTransaction localTx : localTransactions.values()) {
for (Object key : localTx.getAffectedKeys()) {
List<Address> oldPrimaryOwner = chOld.locate(key, 1);
List<Address> newPrimaryOwner = chNew.locate(key, 1);
if (!oldPrimaryOwner.get(0).equals(newPrimaryOwner.get(0))) {
localTx.markForRollback(true);
log.tracef("Marked local transaction %sfor rollback, as the main data " +
"owner has changed from %s to %s", localTx.getGlobalTransaction(),
oldPrimaryOwner, newPrimaryOwner);