talent-plan/tinykv

Would transaction order conflict with apply order?

RagingSpud opened this issue · 1 comments

Suppose we have two transactions T1 and T2. And T1 has a smaller start_ts .
1 .T1 modify key1 and start a 2pc.
2. T2 read key1 and blocked by T1.
But in raftlog 2 is ahead of 1, so applying raftlog orderly will result in a deadlock.
Am I miss something? Can I avoid this without using readindex/lease read?

Read won't block raft log apply in any way