midenok / mariadb

MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
GNU General Public License v2.0
0 stars 0 forks source link

PXC optimizations #21

Closed midenok closed 7 years ago

midenok commented 7 years ago
@@ -1814,15 +1863,21 @@ log_online_purge_changed_page_bitmaps(
                lsn = LSN_MAX;
        }

+       bool log_bmp_sys_inited = false;
        if (srv_redo_log_thread_started) {
                /* User requests might happen with both enabled and disabled
                tracking */
-               mutex_enter(&log_bmp_sys->mutex);
+               log_bmp_sys_inited = true;
+               mutex_enter(&log_bmp_sys_mutex);
+               if (!srv_redo_log_thread_started) {
+                       log_bmp_sys_inited = false;
+                       mutex_exit(&log_bmp_sys_mutex);
+               }
        }

        if (!log_online_setup_bitmap_file_range(&bitmap_files, 0, LSN_MAX)) {
-               if (srv_redo_log_thread_started) {
-                       mutex_exit(&log_bmp_sys->mutex);
+               if (log_bmp_sys_inited) {
+                       mutex_exit(&log_bmp_sys_mutex);
                }
                return true;
        }

Commit c01c75da8ec67197e5b2f86edbdd9541df717faa