I hope you don’t mind if I correct you here slightly because the way you state your concern seems to indicate that Axon Server has not requested the OS to write the data to disk when it sends the confirmation back to the client. First of all, when Axon Server stores the data for itself, it does this using memory-mapped files. This means that it actually has transferred the responsibility for that data to the OS already and, barring catastrophic failure, nothing is left to be done.
In modern Operating Systems, there is virtually no difference between asking the OS to write a block of data to disk (or reading a block from disk) and using an explicitly memory-mapped file, apart from the extra copy operation to or from that buffer.
Axon Server has an additional function that helps prevent data loss through catastrophic loss of the server, by explicitly asking the OS to write any (memory-mapped) data to disk at a certain interval. This interval is controlled by three properties:
axoniq.axonserver.replication.force-interval controls the interval for the (Axon Server EE) Replication Logs.
axoniq.axonserver.event.force-interval controls the interval for the events in the Event Store.
axoniq.axonserver.snapshot.force-interval controls the interval for the snapshots in the Event Store.
All three have a default value of
1000, which translates to 1000 microseconds or 1 second.
So, to get back to your original question: No, when the data is committed it has been written to the files, and (strictly speaking) only the OS needs to do some extra work, but that is no longer Axon Server’s responsibility. However, you are correct in the sense that the data may not have actually been transferred to disk, so a catastrophic failure at precisely that instant could cause the situation you describe. Forcing the synchronization at any change in the data or at every write call has a definite performance impact, so Axon Server uses a timed synchronization loop instead. This synchronization is also forced during a normal shutdown of the application. But the actual execution of the write is completely in the hands of the OS.
I hope this answers your concerns.