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


##########
accord-core/src/test/java/accord/burn/BurnTest.java:
##########
@@ -230,37 +237,50 @@ static void burn(RandomSource random, TopologyFactory 
topologyFactory, List<Id>
 
         // not used for atomicity, just for encapsulation
         AtomicReference<Runnable> onSubmitted = new AtomicReference<>();
-        Consumer<Packet> responseSink = packet -> {
-            ListResult reply = (ListResult) packet.message;
-            if (replies[(int)packet.replyId] != null)
-                return;
-
+        Runnable maybeTriggerNextRequest = () -> {

Review Comment:
   > "should" there be any "future responses"? We send the heart beat IFF the 
client saw a failure
   
   Yes, the client will later receive a message if the transaction is recovered 
- at least to notify of its successful application (I think we do not notify 
the client on invalidation). 
   
   > I saw this code as limiting the number of packets and not in-flight Txn, 
so we see a client exception (timeout / fault) and would enqueue the next.
   
   Yes, but the client will (hopefully) receive the later _valid_ response that 
informs of the outcome of the transaction, at which point it will trigger 
_another_ pack send, breaching our limits.
   
   > The issue I saw was that we stopped enqueuing work
   
   I don't think that error meant that we had stopped enqueueing work that was 
still pending - it means we didn't get a complete set of responses to the work 
we had successfully enqueued. Reaching that message should mean we *must have* 
successfully enqueued every client packet. We don't stop the simulation until 
we have sent all packets and processed all ensuing work.
   



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