// For write-only Tx's we prepare the transaction modifications directly on the shard actor
// to avoid the overhead of creating a separate transaction actor.
transactionContextWrapper.executePriorTransactionOperations(createValidTransactionContext(
- primaryShard, primaryShard.path().toString(), primaryShardInfo.getPrimaryShardVersion()));
+ primaryShard, String.valueOf(primaryShard.path()), primaryShardInfo.getPrimaryShardVersion()));
} else {
tryCreateTransaction();
}
private TransactionContext createValidTransactionContext(ActorSelection transactionActor, String transactionPath,
short remoteTransactionVersion) {
- // TxActor is always created where the leader of the shard is.
- // Check if TxActor is created in the same node
- boolean isTxActorLocal = getActorContext().isPathLocal(transactionPath);
final TransactionContext ret = new RemoteTransactionContext(transactionContextWrapper.getIdentifier(),
- transactionActor, getActorContext(), isTxActorLocal, remoteTransactionVersion,
- transactionContextWrapper.getLimiter());
+ transactionActor, getActorContext(), remoteTransactionVersion, transactionContextWrapper.getLimiter());
if(parent.getType() == TransactionType.READ_ONLY) {
- TransactionContextCleanup.track(this, ret);
+ TransactionContextCleanup.track(parent, ret);
}
return ret;