ifesdjeen commented on code in PR #157:
URL: https://github.com/apache/cassandra-accord/pull/157#discussion_r1918561987
##########
accord-core/src/test/java/accord/impl/basic/DelayedCommandStores.java:
##########
@@ -351,7 +352,9 @@ public void postExecute()
Command before = safe.original();
Command after = safe.current();
- commandStore.journal.saveCommand(commandStore.id(), new
CommandUpdate(before, after), () -> {});
+ AsyncResults.SettableResult<Void> flush = new
AsyncResults.SettableResult<>();
+ commandStore.journal.saveCommand(commandStore.id(), new
CommandUpdate(before, after), () -> flush.setSuccess(null));
+ AsyncChains.getUnchecked(flush);
Review Comment:
In memory journal is already synchornous; in Cassandra integration this
simply ensures we wait for flush, so we simply make journal write synchronous.
Since BurnTest does not control journal threads, it does not really know
whether the call is synchronous or no, so from its perspective, `postExecute`
will just be executed slightly longer.
In retrospect, I actually think for _burn test_ this is actually optional,
because we are using mmap, so by the time we exit the write function, data is
already readable for the remainder of the test. I still felt like it is
important to exercise flush callbacks.
A much more important part of this PR is on Cassandra side.
--
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]