Thanks for the reply. Based on the reply, I want to know the following case can happen or not. Let's say we use command logging in asynchronous way. There are two transactions, transaction 1 and transaction 2. Transaction 1 is depended on transaction 2. Transaction 1's command log and Transaction 2's command log are stored in a different group of nodes. Because the command log is flushed to the disk asynchronously and locally, Transaction 2's command log may go to disk first. At this time. Then the system crash before Transaction 1's command log go to disk. When recovery, there is only Transaction 2's command log. Is it possible?
First - you can run synchronous command logging to guarantee that every transaction is fsync'd to each replica's disk before a reply is generated to the client. That avoids this question entirely.
Re: async command logging:
1. In the case that Transaction 1 (Tx1) and Transaction 2 (Tx2) are single partition transactions for the same partition, they will replay in the order Tx1, Tx2. Either may be lost (not fsync'd), but their order will never be commuted.
2. In the case that Tx1 and Tx2 are both multi-partition transactions, same as above.
3. In the case that Tx1 and Tx2 are for different partitions, or that one is a single partition transaction and the other is a multi-partition transaction, it would be possible to replay Tx2 without Tx1. But see my first point about using synchronous command logging..