Closed ghost closed 9 years ago
@EasonLiao let me know what you think.
sorry for my late response, I thought zxid in deliver is useless but I changed my mind in pulsed. I think it's necessary to implement pulsed without idempotency requirement. Since the snapshot is always consistent so we just need to remember the last zxid which makes the root node in snapshot and in recovery we just don't apply the transaction before the zxid then we can get rid of idempotency requirement, make sense?
why would zab deliver transactions with zxids earlier than the snapshot zxid?
because the snapshot and delivery of transaction happen in different threads. The snapshot thread only knows the last zxid of transaction which is guaranteed in state machine, not the most recent one.
ok i understand.
how would an application use zxid from preprocess/deliver?
http://zk1931.github.io/jzab/0.4.0-SNAPSHOT/javadoc/