dcapwell commented on code in PR #40:
URL: https://github.com/apache/cassandra-accord/pull/40#discussion_r1157807404
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -219,12 +248,22 @@ private void ack()
// and prevents races where we respond before dispatching all the
required reads (if the reads are
// completing faster than the reads can be setup on all required
shards)
if (-1 == --waitingOnCount)
- node.reply(replyTo, replyContext, new ReadOk(data));
+ {
+ if (isObsolete)
+ {
+ logger.debug("After the read completed for txn {}, the result
was marked obsolete", txnId);
+ node.reply(replyTo, replyContext, Redundant);
+ }
+ else
+ {
+ node.reply(replyTo, replyContext, new ReadOk(data));
+ }
+ }
}
private synchronized void readComplete(CommandStore commandStore, Data
result)
{
- Invariants.checkState(waitingOn.get(commandStore.id()), "Waiting on
does not contain store %d; waitingOn=%s", commandStore.id(), waitingOn);
+ Invariants.checkState(waitingOn.get(commandStore.id()), "Txn %s's
waiting on does not contain store %d; waitingOn=%s", txnId, commandStore.id(),
waitingOn);
Review Comment:
fixed by https://issues.apache.org/jira/browse/CASSANDRA-18364
--
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]