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

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 503
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1239062
Merge into: lp:percona-server/5.6
Diff against target: 55 lines (+16/-7)
2 files modified
Percona-Server/storage/innobase/include/buf0flu.h (+3/-3)
Percona-Server/storage/innobase/include/buf0flu.ic (+13/-4)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1239062
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Vlad Lesin (community) g2 Approve
Review via email: mp+193885@code.launchpad.net

This proposal supersedes a proposal from 2013-10-21.

Description of the change

2nd MP:
- added a note to @return tag in the header comment;
- rebased on the current trunk.

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

1st MP:

Fix bug 1239062 (InnoDB: Error: semaphore wait has lasted > 600
seconds. InnoDB: We intentionally crash the server, because it appears
to be hung. InnoDB: Assertion failure in thread <nr> in file
srv0srv.cc line 2124. Abort (sig=6) in srv_error_monitor_thread
(III)).

The issue is the backoff loop in log_preflush_pool_modified_pages()
turning into an infinite loop when the function is called with dirty
buffer pool, the innermost loop enters, and a buffer pool flush list
flush that fully cleans the pool starts and fully completes before the
next buf_flush_list_in_progress() check. Then that check will keep on
returning false until something dirties the buffer pool, which may
never happen.

Fix by adjusting buf_flush_flush_list_in_progress() to return true
also in the case when all the buffer pool instances are clean.

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

To post a comment you must log in.
Revision history for this message
Vlad Lesin (vlad-lesin) wrote : Posted in a previous version of this proposal

I think the fact that buf_flush_flush_list_in_progress() returns true not only if flush is in progress but also if flush list is clean should be documented in "@return" section.

review: Needs Fixing (g2)
Revision history for this message
Vlad Lesin (vlad-lesin) :
review: Approve (g2)
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/storage/innobase/include/buf0flu.h'
2--- Percona-Server/storage/innobase/include/buf0flu.h 2013-10-23 08:48:28 +0000
3+++ Percona-Server/storage/innobase/include/buf0flu.h 2013-11-05 07:33:32 +0000
4@@ -279,9 +279,9 @@
5 #endif /* !UNIV_HOTBACKUP */
6
7 /******************************************************************//**
8-Check if a flush list flush is in progress for any buffer pool instance for
9-heuristic purposes.
10-@return true if flush list flush is in progress */
11+Check if a flush list flush is in progress for any buffer pool instance, or if
12+all the instances are clean, for heuristic purposes.
13+@return true if flush list flush is in progress or buffer pool is clean */
14 UNIV_INLINE
15 bool
16 buf_flush_flush_list_in_progress(void)
17
18=== modified file 'Percona-Server/storage/innobase/include/buf0flu.ic'
19--- Percona-Server/storage/innobase/include/buf0flu.ic 2013-10-23 08:48:28 +0000
20+++ Percona-Server/storage/innobase/include/buf0flu.ic 2013-11-05 07:33:32 +0000
21@@ -137,14 +137,16 @@
22 #endif /* !UNIV_HOTBACKUP */
23
24 /******************************************************************//**
25-Check if a flush list flush is in progress for any buffer pool instance for
26-heuristic purposes.
27-@return true if flush list flush is in progress */
28+Check if a flush list flush is in progress for any buffer pool instance, or if
29+all the instances are clean, for heuristic purposes.
30+@return true if flush list flush is in progress or buffer pool is clean */
31 UNIV_INLINE
32 bool
33 buf_flush_flush_list_in_progress(void)
34 /*==================================*/
35 {
36+ bool all_clean = true;
37+
38 for (ulint i = 0; i < srv_buf_pool_instances; i++) {
39
40 const buf_pool_t* buf_pool = buf_pool_from_array(i);
41@@ -153,6 +155,13 @@
42
43 return(true);
44 }
45+
46+ if (all_clean) {
47+
48+ all_clean = (UT_LIST_GET_LEN(buf_pool->flush_list)
49+ == 0);
50+ }
51+
52 }
53- return(false);
54+ return(all_clean);
55 }

Subscribers

People subscribed via source and target branches