Kristian Nielsen <knielsen@knielsen-hq.org> writes:
I next want to try one thing that I may have mentioned before: Implement an option so that threads wait with COMMIT until the previous event group has committed. I will try to implement this and let you know how it goes.
I implemented a first version of this, attached below. This is work in progress, there will be more work to do. But it seems to mostly work, so I wanted that you have the chance to look at it and see what my idea is and tell me your opinion. The patch makes later transactions wait for earlier transactions to commit before committing themselves. The waiting probably looks more complex than necessary, but this is because I prepared for integration with group commit. For now transactions will be committed one at a time, in order. Later I want to implement that if transaction T2 waits for T1, then T1 and T2 will be committed together. This could maybe give a nice speedup if --sync-binlog=1. The waiting stuff in sql_class.cc is prepared for this. There were three new test failures: rpl.rpl_semi_sync, rpl.rpl_row_001, and rpl.rpl_row_inexist_tbl. I will look into that later, but wanted to send you the patch as early as possible. If you want, you can try to test it for performance against no ordering. Do let me know if there are problems, I will try to fix it. - Kristian.