belliottsmith commented on code in PR #2245:
URL: https://github.com/apache/cassandra/pull/2245#discussion_r1147967214
##########
src/java/org/apache/cassandra/service/accord/AccordCallback.java:
##########
@@ -32,18 +34,22 @@
class AccordCallback<T extends Reply> implements RequestCallback<T>
{
private static final Logger logger =
LoggerFactory.getLogger(AccordCallback.class);
+ private final CommandStore commandStore;
private final Callback<T> callback;
- public AccordCallback(Callback<T> callback)
+ public AccordCallback(CommandStore commandStore, Callback<T> callback)
{
+ this.commandStore = commandStore;
this.callback = callback;
}
@Override
public void onResponse(Message<T> msg)
{
logger.debug("Received response {} from {}", msg.payload, msg.from());
- callback.onSuccess(EndpointMapping.endpointToId(msg.from()),
msg.payload);
+ commandStore.execute(PreLoadContext.empty(), ignore ->
+
callback.onSuccess(EndpointMapping.endpointToId(msg.from()), msg.payload))
+ .begin(commandStore.agent());
Review Comment:
should this align with .execute()? If not, let's bring down the closing
brace, so it's clear we're continuing the prior line.
--
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]