-
Libing Song authored
PLUGIN_LOCK MUTEX CONTENTIONS Semisync became very slow if there were many dump threads(mysqlbinlog or slave io connections) working at the same time. Despite the dump connections didn't support semisync, semisync master plugin functions were still called. That caused plugin lock very hot and also wasted some time on unnecessary code. After this fix, non-semisync dump threads don't call semisync master functions to observe binary events anymore. The implementation is: * As you know, every dump thread calls transmit_start hook to tell semisync master a dump thread starts. Now, semisync master plugin's transmit_start() returns either F_OBSERVE or F_DONT_OBSERVE flag to the dump thread. F_OBSERVE is returned if the dump connection is a semisync connection, otherwise F_DONT_OBSERVE is returned. * Dump thread will call the hooks to observe every event if it get F_OBSERVE flag. Otherwise it will not call the hooks.
Libing Song authoredPLUGIN_LOCK MUTEX CONTENTIONS Semisync became very slow if there were many dump threads(mysqlbinlog or slave io connections) working at the same time. Despite the dump connections didn't support semisync, semisync master plugin functions were still called. That caused plugin lock very hot and also wasted some time on unnecessary code. After this fix, non-semisync dump threads don't call semisync master functions to observe binary events anymore. The implementation is: * As you know, every dump thread calls transmit_start hook to tell semisync master a dump thread starts. Now, semisync master plugin's transmit_start() returns either F_OBSERVE or F_DONT_OBSERVE flag to the dump thread. F_OBSERVE is returned if the dump connection is a semisync connection, otherwise F_DONT_OBSERVE is returned. * Dump thread will call the hooks to observe every event if it get F_OBSERVE flag. Otherwise it will not call the hooks.
Loading