dcapwell commented on code in PR #28:
URL: https://github.com/apache/cassandra-accord/pull/28#discussion_r1131814663


##########
accord-core/src/test/java/accord/burn/TopologyUpdates.java:
##########
@@ -185,46 +186,47 @@ private static Collection<Node.Id> allNodesFor(Txn txn, 
Topology... topologies)
         return result;
     }
 
-    private static Stream<MessageTask> syncEpochCommands(Node node, long 
srcEpoch, Ranges ranges, Function<CommandSync, Collection<Node.Id>> recipients, 
long trgEpoch, boolean committedOnly) throws ExecutionException
+    private static AsyncChain<Stream<MessageTask>> syncEpochCommands(Node 
node, long srcEpoch, Ranges ranges, Function<CommandSync, Collection<Node.Id>> 
recipients, long trgEpoch, boolean committedOnly)
     {
         Map<TxnId, CheckStatusOk> syncMessages = new ConcurrentHashMap<>();
         Consumer<Command> commandConsumer = command -> 
syncMessages.merge(command.txnId(), new CheckStatusOk(node, command), 
CheckStatusOk::merge);
+        AsyncChain<Void> start;
         if (committedOnly)
-            getUninterruptibly(node.commandStores().forEach(commandStore -> 
InMemoryCommandStore.inMemory(commandStore).forCommittedInEpoch(ranges, 
srcEpoch, commandConsumer)));
+            start = node.commandStores().forEach(commandStore -> 
InMemoryCommandStore.inMemory(commandStore).forCommittedInEpoch(ranges, 
srcEpoch, commandConsumer));
         else
-            getUninterruptibly(node.commandStores().forEach(commandStore -> 
InMemoryCommandStore.inMemory(commandStore).forEpochCommands(ranges, srcEpoch, 
commandConsumer)));
+            start = node.commandStores().forEach(commandStore -> 
InMemoryCommandStore.inMemory(commandStore).forEpochCommands(ranges, srcEpoch, 
commandConsumer));

Review Comment:
   this caused a dead lock once the Executor was made the delayed one, so made 
it async



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