denis-chudov commented on code in PR #2483:
URL: https://github.com/apache/ignite-3/pull/2483#discussion_r1305539631
##########
modules/runner/src/main/java/org/apache/ignite/internal/app/IgniteImpl.java:
##########
@@ -374,7 +374,13 @@ public class IgniteImpl implements Ignite {
ReplicaService replicaSvc = new
ReplicaService(clusterSvc.messagingService(), clock);
// TODO: IGNITE-19344 - use nodeId that is validated on join (and
probably generated differently).
- txManager = new TxManagerImpl(replicaSvc, lockMgr, clock, new
TransactionIdGenerator(() -> clusterSvc.nodeName().hashCode()));
+ txManager = new TxManagerImpl(
+ replicaSvc,
+ lockMgr,
+ clock,
+ new TransactionIdGenerator(() ->
clusterSvc.nodeName().hashCode()),
+ () -> clusterSvc.topologyService().localMember().id()
Review Comment:
Actually it is a closure to initialize lazy value. Passing the closure makes
mocks more simple.
If you are speaking also about this `new TransactionIdGenerator(() ->
clusterSvc.nodeName().hashCode()),` - here the closure is passed to
`TransactionIdGenerator`, not to `TxManagerImpl` itself.
--
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]