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
0a573e7e
Commit
0a573e7e
authored
Mar 29, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
792972a6
7d7bdd4a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
23 deletions
+26
-23
storage/innobase/buf/buf0flu.cc
storage/innobase/buf/buf0flu.cc
+9
-2
storage/innobase/include/log0log.h
storage/innobase/include/log0log.h
+4
-5
storage/innobase/log/log0log.cc
storage/innobase/log/log0log.cc
+8
-7
storage/innobase/srv/srv0mon.cc
storage/innobase/srv/srv0mon.cc
+2
-5
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+1
-2
storage/maria/ma_open.c
storage/maria/ma_open.c
+2
-2
No files found.
storage/innobase/buf/buf0flu.cc
View file @
0a573e7e
...
...
@@ -1721,9 +1721,16 @@ static bool log_checkpoint_low(lsn_t oldest_lsn, lsn_t end_lsn)
ut_ad
(
!
recv_no_log_write
);
ut_ad
(
oldest_lsn
>=
log_sys
.
last_checkpoint_lsn
);
const
lsn_t
age
=
oldest_lsn
-
log_sys
.
last_checkpoint_lsn
;
if
(
oldest_lsn
>
log_sys
.
last_checkpoint_lsn
+
SIZE_OF_FILE_CHECKPOINT
)
if
(
age
>
SIZE_OF_FILE_CHECKPOINT
+
log_sys
.
framing_size
())
/* Some log has been written since the previous checkpoint. */
;
else
if
(
age
>
SIZE_OF_FILE_CHECKPOINT
&&
!
((
log_sys
.
log
.
calc_lsn_offset
(
oldest_lsn
)
^
log_sys
.
log
.
calc_lsn_offset
(
log_sys
.
last_checkpoint_lsn
))
&
~
lsn_t
{
OS_FILE_LOG_BLOCK_SIZE
-
1
}))
/* Some log has been written to the same log block. */
;
else
if
(
srv_shutdown_state
>
SRV_SHUTDOWN_INITIATED
)
/* MariaDB startup expects the redo log file to be logically empty
(not even containing a FILE_CHECKPOINT record) after a clean shutdown.
...
...
@@ -1767,7 +1774,7 @@ static bool log_checkpoint_low(lsn_t oldest_lsn, lsn_t end_lsn)
ut_ad
(
log_sys
.
get_flushed_lsn
()
>=
flush_lsn
);
if
(
log_sys
.
n_pending_checkpoint_writes
)
if
(
log_sys
.
checkpoint_pending
)
{
/* A checkpoint write is running */
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
...
...
storage/innobase/include/log0log.h
View file @
0a573e7e
...
...
@@ -601,11 +601,10 @@ struct log_t{
/*!< next checkpoint number */
/** latest completed checkpoint (protected by log_sys.mutex) */
Atomic_relaxed
<
lsn_t
>
last_checkpoint_lsn
;
lsn_t
next_checkpoint_lsn
;
/*!< next checkpoint lsn */
ulint
n_pending_checkpoint_writes
;
/*!< number of currently pending
checkpoint writes */
/** next checkpoint LSN (protected by log_sys.mutex) */
lsn_t
next_checkpoint_lsn
;
/** whether a checkpoint is pending */
Atomic_relaxed
<
bool
>
checkpoint_pending
;
/** buffer for checkpoint header */
byte
*
checkpoint_buf
;
...
...
storage/innobase/log/log0log.cc
View file @
0a573e7e
...
...
@@ -214,7 +214,7 @@ void log_t::create()
max_checkpoint_age
=
0
;
next_checkpoint_no
=
0
;
next_checkpoint_lsn
=
0
;
n_pending_checkpoint_writes
=
0
;
checkpoint_pending
=
false
;
log_block_init
(
buf
,
LOG_START_LSN
);
log_block_set_first_rec_group
(
buf
,
LOG_BLOCK_HDR_SIZE
);
...
...
@@ -962,7 +962,8 @@ ATTRIBUTE_COLD void log_write_checkpoint_info(lsn_t end_lsn)
ut_ad
(
LOG_CHECKPOINT_1
<
srv_page_size
);
ut_ad
(
LOG_CHECKPOINT_2
<
srv_page_size
);
++
log_sys
.
n_pending_checkpoint_writes
;
ut_ad
(
!
log_sys
.
checkpoint_pending
);
log_sys
.
checkpoint_pending
=
true
;
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
...
...
@@ -977,8 +978,8 @@ ATTRIBUTE_COLD void log_write_checkpoint_info(lsn_t end_lsn)
mysql_mutex_lock
(
&
log_sys
.
mutex
);
--
log_sys
.
n_pending_checkpoint_writes
;
ut_ad
(
log_sys
.
n_pending_checkpoint_writes
==
0
)
;
ut_ad
(
log_sys
.
checkpoint_pending
)
;
log_sys
.
checkpoint_pending
=
false
;
log_sys
.
next_checkpoint_no
++
;
...
...
@@ -1174,8 +1175,8 @@ ATTRIBUTE_COLD void logs_empty_and_mark_files_at_shutdown()
if
(
log_sys
.
is_initialised
())
{
mysql_mutex_lock
(
&
log_sys
.
mutex
);
const
ulint
n_write
=
log_sys
.
n_pending_checkpoint_writes
;
const
ulint
n_flush
=
log_sys
.
pending_flushes
;
const
size_t
n_write
{
log_sys
.
checkpoint_pending
}
;
const
size_t
n_flush
{
log_sys
.
get_pending_flushes
()}
;
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
if
(
n_write
||
n_flush
)
{
...
...
@@ -1311,7 +1312,7 @@ log_print(
ULINTPF
" pending chkp writes
\n
"
ULINTPF
" log i/o's done, %.2f log i/o's/second
\n
"
,
log_sys
.
pending_flushes
.
load
(),
log_sys
.
n_pending_checkpoint_writes
,
ulint
{
log_sys
.
checkpoint_pending
}
,
log_sys
.
n_log_ios
,
static_cast
<
double
>
(
log_sys
.
n_log_ios
-
log_sys
.
n_log_ios_old
)
...
...
storage/innobase/srv/srv0mon.cc
View file @
0a573e7e
...
...
@@ -2,7 +2,7 @@
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 202
1
, MariaDB Corporation.
Copyright (c) 2013, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -1765,10 +1765,7 @@ srv_mon_process_existing_counter(
break
;
case
MONITOR_PENDING_CHECKPOINT_WRITE
:
mysql_mutex_lock
(
&
log_sys
.
mutex
);
value
=
static_cast
<
mon_type_t
>
(
log_sys
.
n_pending_checkpoint_writes
);
mysql_mutex_unlock
(
&
log_sys
.
mutex
);
value
=
log_sys
.
checkpoint_pending
;
break
;
case
MONITOR_LOG_IO
:
...
...
storage/innobase/srv/srv0start.cc
View file @
0a573e7e
...
...
@@ -1225,14 +1225,13 @@ dberr_t srv_start(bool create_new_db)
recv_sys
.
create
();
lock_sys
.
create
(
srv_lock_table_size
);
srv_startup_is_before_trx_rollback_phase
=
true
;
if
(
!
srv_read_only_mode
)
{
buf_flush_page_cleaner_init
();
ut_ad
(
buf_page_cleaner_is_active
);
}
srv_startup_is_before_trx_rollback_phase
=
true
;
/* Check if undo tablespaces and redo log files exist before creating
a new system tablespace */
if
(
create_new_db
)
{
...
...
storage/maria/ma_open.c
View file @
0a573e7e
...
...
@@ -292,9 +292,9 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags,
#ifndef WITH_S3_STORAGE_ENGINE
DBUG_ASSERT
(
!
s3
);
#endif
/* WITH_S3_STORAGE_ENGINE */
#else
if
(
!
s3
)
#endif
/* WITH_S3_STORAGE_ENGINE */
{
realpath_err
=
my_realpath
(
name_buff
,
fn_format
(
org_name
,
name
,
""
,
MARIA_NAME_IEXT
,
...
...
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