Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
Description
The function log_checkpoint() or log_checkpoint_low() tries to avoid redundant writes. Here is the 10.3 version of log_checkpoint():
if (oldest_lsn |
> log_sys.last_checkpoint_lsn + SIZE_OF_MLOG_CHECKPOINT) {
|
/* Some log has been written since the previous checkpoint. */ |
} else if (srv_shutdown_state > SRV_SHUTDOWN_INITIATED) { |
/* MariaDB 10.3 startup expects the redo log file to be |
logically empty (not even containing a MLOG_CHECKPOINT record)
|
after a clean shutdown. Perform an extra checkpoint at
|
shutdown. */
|
} else { |
/* Do nothing, because nothing was logged (other than |
a MLOG_CHECKPOINT marker) since the previous checkpoint. */
|
log_mutex_exit();
|
return(true); |
}
|
...
|
if (fil_names_clear(flush_lsn, do_write)) { |
This logic fails to take two things into account:
- The function fil_names_clear() may write some file names before the checkpoint record.
- Before
MDEV-14425, the checkpoint record may be interrupted by 4+12 or 8+12 bytes of log block trailer and header.
In either case, the difference of oldest_lsn and log_sys.last_checkpoint_lsn could be more than the size of the checkpoint record.
The simplest way to fix this could be to avoid writing a new checkpoint if oldest_lsn did not change since the previous checkpoint.
Attachments
Issue Links
- relates to
-
MDEV-24845 Oddities around innodb_fatal_semaphore_wait_threshold and global.innodb_disallow_writes
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2022-03-30 04:57:50.0 | 2022-03-30 04:57:50.728 |
Fix Version/s | 10.5.16 [ 27508 ] | |
Fix Version/s | 10.6.8 [ 27506 ] | |
Fix Version/s | 10.7.4 [ 27504 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36749 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36749 ] |