Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
522fbfcb
Commit
522fbfcb
authored
Mar 07, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Remove recv_sys.buf_size
Also, correctly document what recv_sys.mutex is protecting.
parent
0a9633ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
storage/innobase/include/log0recv.h
storage/innobase/include/log0recv.h
+11
-11
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+4
-5
No files found.
storage/innobase/include/log0recv.h
View file @
522fbfcb
...
...
@@ -149,7 +149,7 @@ struct recv_dblwr_t {
/** the recovery state and buffered records for a page */
struct
page_recv_t
{
/** Recovery state */
/** Recovery state
; protected by recv_sys.mutex
*/
enum
{
/** not yet processed */
...
...
@@ -216,10 +216,14 @@ struct page_recv_t
};
/** Recovery system data structure */
struct
recv_sys_t
{
ib_mutex_t
mutex
;
/*!< mutex protecting the fields apply_log_recs,
n_addrs, and the state field in each recv_addr
struct */
struct
recv_sys_t
{
/** mutex protecting apply_log_recs and page_recv_t::state */
ib_mutex_t
mutex
;
/** whether recv_recover_page(), invoked from buf_page_io_complete(),
should apply log records*/
bool
apply_log_recs
;
ib_mutex_t
writer_mutex
;
/*!< mutex coordinating
flushing between recv_writer_thread and
the recovery thread. */
...
...
@@ -230,13 +234,9 @@ struct recv_sys_t{
buf_flush_t
flush_type
;
/*!< type of the flush request.
BUF_FLUSH_LRU: flush end of LRU, keeping free blocks.
BUF_FLUSH_LIST: flush all of blocks. */
/** whether recv_recover_page(), invoked from buf_page_io_complete(),
should apply log records*/
bool
apply_log_recs
;
/** whether recv_apply_hashed_log_recs() is running */
bool
apply_batch_on
;
byte
*
buf
;
/*!< buffer for parsing log records */
size_t
buf_size
;
/*!< size of buf */
ulint
len
;
/*!< amount of data in buf */
lsn_t
parse_start_lsn
;
/*!< this is the lsn from which we were able to
...
...
@@ -294,7 +294,7 @@ struct recv_sys_t{
recv_dblwr_t
dblwr
;
/** Last added LSN to pages. */
lsn_t
last_stored_lsn
;
lsn_t
last_stored_lsn
=
0
;
/** After successful upgrade from multiple redo log files we'd like
to remove extra ones */
...
...
@@ -339,7 +339,7 @@ struct recv_sys_t{
/** Clean up after create() */
void
close
();
bool
is_initialised
()
const
{
return
buf_size
!=
0
;
}
bool
is_initialised
()
const
{
return
last_stored_lsn
!=
0
;
}
/** Register a redo log snippet for a page.
@param page_id page identifier
...
...
storage/innobase/log/log0recv.cc
View file @
522fbfcb
...
...
@@ -902,11 +902,11 @@ void recv_sys_t::close()
}
if
(
buf
)
{
ut_free_dodump
(
buf
,
buf_size
);
ut_free_dodump
(
buf
,
RECV_PARSING_BUF_SIZE
);
buf
=
NULL
;
}
buf_size
=
0
;
last_stored_lsn
=
0
;
mutex_free
(
&
writer_mutex
);
mutex_free
(
&
mutex
);
}
...
...
@@ -1009,7 +1009,6 @@ void recv_sys_t::create()
max_log_blocks
=
buf_pool_get_n_pages
()
/
3
;
buf
=
static_cast
<
byte
*>
(
ut_malloc_dontdump
(
RECV_PARSING_BUF_SIZE
));
buf_size
=
RECV_PARSING_BUF_SIZE
;
len
=
0
;
parse_start_lsn
=
0
;
scanned_lsn
=
0
;
...
...
@@ -1024,7 +1023,7 @@ void recv_sys_t::create()
recv_max_page_lsn
=
0
;
memset
(
truncated_undo_spaces
,
0
,
sizeof
truncated_undo_spaces
);
last_stored_lsn
=
0
;
last_stored_lsn
=
1
;
UT_LIST_INIT
(
blocks
,
&
buf_block_t
::
unzip_LRU
);
}
...
...
@@ -1055,7 +1054,7 @@ void recv_sys_t::debug_free()
mutex_enter
(
&
mutex
);
pages
.
clear
();
ut_free_dodump
(
buf
,
buf_size
);
ut_free_dodump
(
buf
,
RECV_PARSING_BUF_SIZE
);
buf
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment