Merge lp:~laurynas-biveinis/percona-server/bug1407941-5.6 into lp:percona-server/5.6

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 724
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1407941-5.6
Merge into: lp:percona-server/5.6
Diff against target: 54 lines (+17/-6)
1 file modified
storage/innobase/srv/srv0start.cc (+17/-6)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1407941-5.6
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+245716@code.launchpad.net

Description of the change

Merge bug 1407941 fix from 5.5. The 5.6 version of the fix is to shift
the purge worker thread ids towards the threads_id array end. Bump
srv_max_n_threads for the log tracker thread.

http://jenkins.percona.com/job/percona-server-5.6-param/791/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storage/innobase/srv/srv0start.cc'
2--- storage/innobase/srv/srv0start.cc 2015-01-05 17:23:09 +0000
3+++ storage/innobase/srv/srv0start.cc 2015-01-07 07:56:43 +0000
4@@ -128,9 +128,19 @@
5 static os_file_t files[1000];
6
7 /** io_handler_thread parameters for thread identification */
8-static ulint n[SRV_MAX_N_IO_THREADS + 6];
9-/** io_handler_thread identifiers, 32 is the maximum number of purge threads */
10-static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6
11+static ulint n[SRV_MAX_N_IO_THREADS];
12+/** io_handler_thread identifiers, 32 is the maximum number of purge threads.
13+The extra elements at the end are allocated as follows:
14+SRV_MAX_N_IO_THREADS + 1: srv_master_thread
15+SRV_MAX_N_IO_THREADS + 2: lock_wait_timeout_thread
16+SRV_MAX_N_IO_THREADS + 3: srv_error_monitor_thread
17+SRV_MAX_N_IO_THREADS + 4: srv_monitor_thread
18+SRV_MAX_N_IO_THREADS + 5: srv_redo_log_follow_thread
19+SRV_MAX_N_IO_THREADS + 6: srv_purge_coordinator_thread
20+SRV_MAX_N_IO_THREADS + 7: srv_worker_thread
21+...
22+SRV_MAX_N_IO_THREADS + 7 + srv_n_purge_threads - 1: srv_worker_thread */
23+static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 7
24 + SRV_MAX_N_PURGE_THREADS];
25
26 /** We use this mutex to test the return value of pthread_mutex_trylock
27@@ -1842,6 +1852,7 @@
28 + 1 /* srv_error_monitor_thread */
29 + 1 /* srv_monitor_thread */
30 + 1 /* srv_master_thread */
31+ + 1 /* srv_redo_log_follow_thread */
32 + 1 /* srv_purge_coordinator_thread */
33 + 1 /* buf_dump_thread */
34 + 1 /* dict_stats_thread */
35@@ -2729,16 +2740,16 @@
36
37 os_thread_create(
38 srv_purge_coordinator_thread,
39- NULL, thread_ids + 5 + SRV_MAX_N_IO_THREADS);
40+ NULL, thread_ids + 6 + SRV_MAX_N_IO_THREADS);
41
42 ut_a(UT_ARR_SIZE(thread_ids)
43- > 5 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS);
44+ > 6 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS);
45
46 /* We've already created the purge coordinator thread above. */
47 for (i = 1; i < srv_n_purge_threads; ++i) {
48 os_thread_create(
49 srv_worker_thread, NULL,
50- thread_ids + 5 + i + SRV_MAX_N_IO_THREADS);
51+ thread_ids + 6 + i + SRV_MAX_N_IO_THREADS);
52 }
53
54 srv_start_wait_for_purge_to_start();

Subscribers

People subscribed via source and target branches