MySQL gap locking
问题 I have a table called tree_nodes , in there I store a ... tree representation of my nodes. My topic tree is created in the context of a holder. So, there is a column called holder_id . I have a transactional method that is doing several reads from this and other tables in order to determine what nodes should be added/removed from the tree. My application is clustered and is highly concurrent, so, the in-app code mutexes not gonna work. My relational DB is MySQL. Here is what I wanted to do, I