CodePudding user response:
The main table to add a status field, isolate the main table, child table transaction (making the main table state can change alone)Change the state of the main table (are submitting a table data), commit (consider increasing the lock line)
Increase the child table data, submit
Change the state of the main table (child table data submit completed), submit
CodePudding user response:
Add a record operation, 5 minutes are not allowed to repeat the operation,CodePudding user response:
Single machine is locked, the cluster is distributed lockCodePudding user response:
You can modify the state of the parent table for first row locks, then word table insert, repeat request will get stuck in a state that modify the parent table lock, without repeated injection