Hi community, StateMachine Interface has both ApplyTransactionSerial and ApplyTransaction, and these two function definition are:
TransactionContext applyTransactionSerial(TransactionContext trx); CompletableFuture<Message> applyTransaction(TransactionContext trx); The comments about ApplyTransactionSerial says " This step is called sequentially in strict serial order that the transactions have been committed in the log." The comments about ApplyTransaction says " This method can be called concurrently with the other calls, and there is no guarantee that the calls will be ordered according to the log commit order." So my question is, shouldn't there another API "Message applyTransactionSerial(TransactionContext trx)" that both guarantees to apply in the order of the log while it allows return a Message? "TransactionContext applyTransactionSerial(TransactionContext trx);" does not return a Message (for the sake of applying the transaction to the state machine and return a result). "CompletableFuture<Message> applyTransaction(TransactionContext trx);" could apply transaction concurrently thus raft log ordering is not guaranteed. -Rui
