belliottsmith commented on code in PR #121:
URL: https://github.com/apache/cassandra-accord/pull/121#discussion_r1762623427
##########
accord-core/src/main/java/accord/local/cfk/SafeCommandsForKey.java:
##########
@@ -55,12 +55,13 @@ void updatePruned(SafeCommandStore safeStore, Command
nextCommand, NotifySink no
public void update(SafeCommandStore safeStore, Command nextCommand)
{
CommandsForKey prevCfk = current();
- update(safeStore, nextCommand, prevCfk, prevCfk.update(nextCommand));
+ CommandsForKeyUpdate cfkUpdate = prevCfk.update(nextCommand);
+ update(safeStore, nextCommand, prevCfk, cfkUpdate);
}
private void update(SafeCommandStore safeStore, @Nullable Command command,
CommandsForKey prevCfk, CommandsForKeyUpdate updateCfk)
{
- update(safeStore, command, prevCfk, updateCfk,
NotifySink.DefaultNotifySink.INSTANCE);
+ update(safeStore, command, prevCfk, updateCfk, safeStore.replay() ?
NotifySink.NoOpSink.INSTANCE : NotifySink.DefaultNotifySink.INSTANCE);
Review Comment:
I think we can switch behaviour more cleanly here, but also we need to
either capture the notifications OR we need to actually submit them OR we need
to avoid updating unmanaged altogether and batch notify them at the end -
otherwise they may never be notified.
--
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]