belliottsmith commented on code in PR #113:
URL: https://github.com/apache/cassandra-accord/pull/113#discussion_r1745974206
##########
accord-core/src/main/java/accord/messages/ReadData.java:
##########
@@ -183,31 +184,38 @@ protected synchronized CommitOrReadNack
apply(SafeCommandStore safeStore, SafeCo
Command command = safeCommand.current();
SaveStatus status = command.saveStatus();
+ int storeId = safeStore.commandStore().id();
logger.trace("{}: setting up read with status {} on {}", txnId,
status, safeStore);
switch (actionForStatus(status))
{
default: throw new AssertionError();
case WAIT:
- waitingOn.set(safeStore.commandStore().id());
- ++waitingOnCount;
- safeCommand.addListener(this);
- // TODO (expected): should we invoke waiting directly? We
depend on NotifyWaitingOn to make progress, and it will call this.
- // Though we might get PreApplied info earlier.
- safeStore.progressLog().waiting(safeCommand,
executeOn().min.execution, null, readScope);
- beginWaiting(safeStore, false);
+ if (waitSynchronously())
Review Comment:
I think I disabled it to draw some line about what changes were made, and to
make the coordination of some things that relied on read asynchronous was more
work than I anticipated. I did test just asynchronous reads before disabling
them. We could remove the code, as I think it is possible we might prefer not
to have asynchronous reads anyway - we might prefer to simply perform an
asynchronous wait (using the Await logic) before performing synchronous reads.
--
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]