dcapwell commented on code in PR #219: URL: https://github.com/apache/cassandra-accord/pull/219#discussion_r2226221546
########## accord-core/src/main/java/accord/local/Commands.java: ########## @@ -298,12 +310,16 @@ public static AcceptOutcome notAccept(SafeCommandStore safeStore, SafeCommand sa { AcceptOutcome reject = maybeRejectAccept(ballot, null, command, true); if (reject != null) + { + safeStore.agent().localEvents().onRejectNotAccept(safeStore, command, reject); return reject; + } } logger.trace("{}: not accepted ({})", command.txnId(), status); - safeCommand.notAccept(safeStore, status, ballot); + Command notAccepted = safeCommand.notAccept(safeStore, status, ballot); safeStore.notifyListeners(safeCommand, command); + safeStore.agent().localEvents().onNotAccepted(safeStore, notAccepted); Review Comment: same as above comment, should this be before `notifyListeners`? ########## accord-core/src/main/java/accord/local/Commands.java: ########## @@ -286,8 +297,9 @@ public static AcceptOutcome accept(SafeCommandStore safeStore, SafeCommand safeC PartialDeps partialDeps = prepareDeps(validated, participants, command, deps); participants = prepareParticipants(validated, participants, command); - safeCommand.accept(safeStore, newSaveStatus, participants, ballot, executeAt, partialTxn, partialDeps, ballot); + Command accepted = safeCommand.accept(safeStore, newSaveStatus, participants, ballot, executeAt, partialTxn, partialDeps, ballot); safeStore.notifyListeners(safeCommand, command); + safeStore.agent().localEvents().onAccepted(safeStore, accepted); Review Comment: should this happen before `notifyListeners`? That can cause other txn to be updated which can fire off first, so the fact that this was `accepted` before that wouldn't be directly visible if you just looked at the events? -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org