|
2 | 2 |
|
3 | 3 | Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
4 | 4 | Copyright (c) 2012, Facebook Inc.
|
5 |
| -Copyright (c) 2013, 2019, MariaDB Corporation. |
| 5 | +Copyright (c) 2013, 2020, MariaDB Corporation. |
6 | 6 |
|
7 | 7 | This program is free software; you can redistribute it and/or modify it under
|
8 | 8 | the terms of the GNU General Public License as published by the Free Software
|
@@ -103,14 +103,6 @@ static ulint recv_previous_parsed_rec_offset;
|
103 | 103 | /** The 'multi' flag of the previous parsed redo log record */
|
104 | 104 | static ulint recv_previous_parsed_rec_is_multi;
|
105 | 105 |
|
106 |
| -/** This many frames must be left free in the buffer pool when we scan |
107 |
| -the log and store the scanned log records in the buffer pool: we will |
108 |
| -use these free frames to read in pages when we start applying the |
109 |
| -log records to the database. |
110 |
| -This is the default value. If the actual size of the buffer pool is |
111 |
| -larger than 10 MB we'll set this value to 512. */ |
112 |
| -ulint recv_n_pool_free_frames; |
113 |
| - |
114 | 106 | /** The maximum lsn we see for a page during the recovery process. If this
|
115 | 107 | is bigger than the lsn we are able to scan up to, that is an indication that
|
116 | 108 | the recovery failed and the database may be corrupt. */
|
@@ -840,9 +832,6 @@ recv_sys_init()
|
840 | 832 | recv_sys->flush_end = os_event_create(0);
|
841 | 833 | }
|
842 | 834 |
|
843 |
| - recv_n_pool_free_frames = |
844 |
| - buf_pool_get_n_pages() / 3; |
845 |
| - |
846 | 835 | recv_sys->buf = static_cast<byte*>(
|
847 | 836 | ut_malloc_nokey(RECV_PARSING_BUF_SIZE));
|
848 | 837 |
|
@@ -3456,9 +3445,8 @@ recv_group_scan_log_recs(
|
3456 | 3445 | lsn_t end_lsn;
|
3457 | 3446 | store_t store_to_hash = recv_sys->mlog_checkpoint_lsn == 0
|
3458 | 3447 | ? STORE_NO : (last_phase ? STORE_IF_EXISTS : STORE_YES);
|
3459 |
| - ulint available_mem = UNIV_PAGE_SIZE |
3460 |
| - * (buf_pool_get_n_pages() |
3461 |
| - - (recv_n_pool_free_frames * srv_buf_pool_instances)); |
| 3448 | + ulint available_mem = (buf_pool_get_n_pages() * 2 / 3) |
| 3449 | + << srv_page_size_shift; |
3462 | 3450 |
|
3463 | 3451 | group->scanned_lsn = end_lsn = *contiguous_lsn = ut_uint64_align_down(
|
3464 | 3452 | *contiguous_lsn, OS_FILE_LOG_BLOCK_SIZE);
|
|
0 commit comments