What should I do if I encounter a lock after the separation of mysql read and write?

after the separation of mysql read and write, what if one master and multiple slaves encounter scenarios that need to be locked?

Apr.26,2021

what do you mean by this lock? Would you please explain your business needs?

generally speaking, locking should be controlled by the business layer application, which is efficient and controllable.


Lock the mysql written to

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1481-4f813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1481-4f813.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?