Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #21040050 PURGE THREAD MUST EXIT SOONER AT SERVER SHUTDOWN
PROBLEM The purge thread takes too much long time during shutdown. This is because we call trx_purge() three times during shutdown,each time it is called 300 undo log pages are being processed. so even though you set batch size as 300, 900 undo pages are processed during shutdown, whereas in 5.5 it is only called once during shutdown. This is the reason we are seeing a 10 minute delay in shutdown time. FIX --- Instead of calling a separate trx_purge() for truncating the history log, do it with the trx_purge() in work loop once every 128 (TRX_SYS_N_RSEGS) times. Also reduce the batch size to 20 for trx_purge() which is called after detecting shutdown. [#rb 9359 Approved by jimmy]
- Loading branch information