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: no longer in the source branch.
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
=== modified file 'Percona-Server/storage/innobase/log/log0log.cc'
--- Percona-Server/storage/innobase/log/log0log.cc 2013-10-20 08:11:22 +0000
+++ Percona-Server/storage/innobase/log/log0log.cc 2013-11-03 10:02:30 +0000
@@ -251,6 +251,7 @@
251 ulint dummy;251 ulint dummy;
252#endif /* UNIV_LOG_ARCHIVE */252#endif /* UNIV_LOG_ARCHIVE */
253 ulint count = 0;253 ulint count = 0;
254 ulint tcount = 0;
254255
255 ut_a(len < log->buf_size / 2);256 ut_a(len < log->buf_size / 2);
256loop:257loop:
@@ -279,21 +280,6 @@
279 goto loop;280 goto loop;
280 }281 }
281282
282 if (log_check_tracking_margin(len_upper_limit) && (++count < 50)) {
283
284 /* This log write would violate the untracked LSN free space
285 margin. Limit this to 50 retries as there might be situations
286 where we have no choice but to proceed anyway, i.e. if the log
287 is about to be overflown, log tracking or not. */
288 mutex_exit(&(log->mutex));
289
290 os_thread_sleep(10000);
291
292 mutex_enter(&(log->mutex));
293
294 goto loop;
295 }
296
297#ifdef UNIV_LOG_ARCHIVE283#ifdef UNIV_LOG_ARCHIVE
298 if (log->archiving_state != LOG_ARCH_OFF) {284 if (log->archiving_state != LOG_ARCH_OFF) {
299285
@@ -318,6 +304,22 @@
318 }304 }
319#endif /* UNIV_LOG_ARCHIVE */305#endif /* UNIV_LOG_ARCHIVE */
320306
307 if (log_check_tracking_margin(len_upper_limit) &&
308 (++tcount + count < 50)) {
309
310 /* This log write would violate the untracked LSN free space
311 margin. Limit this to 50 retries as there might be situations
312 where we have no choice but to proceed anyway, i.e. if the log
313 is about to be overflown, log tracking or not. */
314 mutex_exit(&(log->mutex));
315
316 os_thread_sleep(10000);
317
318 mutex_enter(&(log->mutex));
319
320 goto loop;
321 }
322
321#ifdef UNIV_LOG_DEBUG323#ifdef UNIV_LOG_DEBUG
322 log->old_buf_free = log->buf_free;324 log->old_buf_free = log->buf_free;
323 log->old_lsn = log->lsn;325 log->old_lsn = log->lsn;

Subscribers

People subscribed via source and target branches