aweisberg commented on code in PR #56:
URL: https://github.com/apache/cassandra-accord/pull/56#discussion_r1296120384
##########
accord-core/src/main/java/accord/messages/WaitOnCommit.java:
##########
@@ -141,13 +147,13 @@ public Void reduce(Void o1, Void o2)
@Override
public void accept(Void result, Throwable failure)
{
- ack();
+ ack(failure);
}
- private void ack()
+ private void ack(@Nullable Throwable fail)
{
if (waitingOnUpdater.decrementAndGet(this) == -1)
- node.reply(replyTo, replyContext, WaitOnCommitOk.INSTANCE);
+ node.reply(replyTo, replyContext, fail != null ?
WaitOnCommitOk.INSTANCE : null, fail);
Review Comment:
Good catch. I will refactor it to check in `accept` and only send the
failure response if it hasn't already sent a regular response and log if
somehow we have failure but already sent a response.
--
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]