dcapwell commented on code in PR #56:
URL: https://github.com/apache/cassandra-accord/pull/56#discussion_r1297810453
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -153,7 +153,11 @@ void read(SafeCommandStore safeStore, Timestamp executeAt,
PartialTxn txn)
{
// TODO (expected, exceptions): should send exception to
client, and consistency handle/propagate locally
logger.trace("{}: read failed for {}: {}", txnId, unsafeStore,
throwable);
- node.reply(replyTo, replyContext, ReadNack.Error);
+ synchronized (ReadData.this)
Review Comment:
why this lock? all impl delegate to `CommandStores` so wouldn't need
locking.
##########
accord-core/src/main/java/accord/messages/ReadTxnData.java:
##########
@@ -231,8 +231,14 @@ protected synchronized void readComplete(CommandStore
commandStore, @Nullable Da
}
@Override
- protected void reply(@Nullable Ranges unavailable, @Nullable Data data)
+ protected void reply(@Nullable Ranges unavailable, @Nullable Data data,
@Nullable Throwable fail)
{
+ if (fail != null)
+ {
+ node.reply(replyTo, replyContext, null, fail);
Review Comment:
```suggestion
state = State.RETURNED;
node.reply(replyTo, replyContext, null, fail);
```
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -53,6 +52,7 @@ public abstract class ReadData extends
AbstractEpochRequest<ReadData.ReadNack>
transient BitSet waitingOn;
transient int waitingOnCount;
transient Ranges unavailable;
+ transient Throwable fail;
Review Comment:
looks like dead code now?
--
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]