belliottsmith commented on code in PR #141:
URL: https://github.com/apache/cassandra-accord/pull/141#discussion_r1852056916


##########
accord-core/src/main/java/accord/coordinate/Persist.java:
##########
@@ -86,12 +84,7 @@ public void onSuccess(Id from, ApplyReply reply)
                     if (!isDone)
                     {
                         isDone = true;
-                        Topologies topologies = tracker.topologies();
-                        Topology topology = topologies.forEpoch(txnId.epoch());
-                        int homeShardIndex = 
topology.indexForKey(route.homeKey());
-                        // we can persist only partially if some shards are 
already completed; in this case the home shard may not participate
-                        if (homeShardIndex >= 0)
-                            node.send(topology.get(homeShardIndex).nodes, to 
-> new InformDurable(to, topologies, route, txnId, executeAt, Majority));
+                        InformDurable.informHome(node, topologies, txnId, 
route, executeAt);

Review Comment:
   it doesn't say it's unsafe, it says we might not have the information in our 
topologies. It's fine to inform the home shard (but perhaps redundant). I 
thought it was simpler to merge the different callers, but happy to split them 
again and introduce a `tryInformHome` (I did have this initially)



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to