tikv / sig-transaction

Resources for the transaction SIG
62 stars 13 forks source link

propose a design of transaction layer refactoring #28

Closed sticnarf closed 4 years ago

sticnarf commented 4 years ago

When I am trying to implement parallel commit related features, I feel it is difficult to change the current code. Especially when I want to add dependencies (like a memory locking table or a PD client ) to it, it makes the code a mess to pass all these thing deep in to where the real logic is.

And I always have a feeling that the scheduler logic is complicated. When the logic of commands become varied, it is not flexible enough and extending using the current structure will make the code harder to understand to new comers to transactions in TiKV.

Therefore, I propose writing the whole logic of transactional commands together. This will largely reduce the code depth and make it easier for people to understand what happens in the whole procedure.