Merge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1193319 into lp:percona-server/5.6

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 494
Merged at revision: 501
Proposed branch: lp:~sergei.glushchenko/percona-server/5.6-ps-bug1193319
Merge into: lp:percona-server/5.6
Diff against target: 56 lines (+17/-15)
1 file modified
Percona-Server/storage/innobase/log/log0log.cc (+17/-15)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1193319
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Vlad Lesin (community) g2 Approve
Review via email: mp+193695@code.launchpad.net

Description of the change

     Bug 1193319: Failing assertion: ++count < 50 in file log0log.cc line 308

     * Move check of log tracking margin below archiving margin, which
       is equivalent of the following:

       if (either margin violated) {
         if (archiving margin violated) {
           archive;
         } else {
           sleep;
         }
         goto loop;
       }

     * Allocate separate count for tracking margin as it insert of
       large BLOB without doing checkpoints makes count spin too fast
       because log tracking margin will always be violated and the
       only possible way to proceed is to proceed further no matter of
       log tracking margin. This is not the case anymore.

     Both changes together make visible effect and assertion is harder
     to violate without changing the idea of assertion.

http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/401/

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

Reset to Needs Review because G1 review was requested originally

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 'Percona-Server/storage/innobase/log/log0log.cc'
2--- Percona-Server/storage/innobase/log/log0log.cc 2013-10-20 08:11:22 +0000
3+++ Percona-Server/storage/innobase/log/log0log.cc 2013-11-03 10:02:30 +0000
4@@ -251,6 +251,7 @@
5 ulint dummy;
6 #endif /* UNIV_LOG_ARCHIVE */
7 ulint count = 0;
8+ ulint tcount = 0;
9
10 ut_a(len < log->buf_size / 2);
11 loop:
12@@ -279,21 +280,6 @@
13 goto loop;
14 }
15
16- if (log_check_tracking_margin(len_upper_limit) && (++count < 50)) {
17-
18- /* This log write would violate the untracked LSN free space
19- margin. Limit this to 50 retries as there might be situations
20- where we have no choice but to proceed anyway, i.e. if the log
21- is about to be overflown, log tracking or not. */
22- mutex_exit(&(log->mutex));
23-
24- os_thread_sleep(10000);
25-
26- mutex_enter(&(log->mutex));
27-
28- goto loop;
29- }
30-
31 #ifdef UNIV_LOG_ARCHIVE
32 if (log->archiving_state != LOG_ARCH_OFF) {
33
34@@ -318,6 +304,22 @@
35 }
36 #endif /* UNIV_LOG_ARCHIVE */
37
38+ if (log_check_tracking_margin(len_upper_limit) &&
39+ (++tcount + count < 50)) {
40+
41+ /* This log write would violate the untracked LSN free space
42+ margin. Limit this to 50 retries as there might be situations
43+ where we have no choice but to proceed anyway, i.e. if the log
44+ is about to be overflown, log tracking or not. */
45+ mutex_exit(&(log->mutex));
46+
47+ os_thread_sleep(10000);
48+
49+ mutex_enter(&(log->mutex));
50+
51+ goto loop;
52+ }
53+
54 #ifdef UNIV_LOG_DEBUG
55 log->old_buf_free = log->buf_free;
56 log->old_lsn = log->lsn;

Subscribers

People subscribed via source and target branches