[MDEV-21382] use fdatasync() for redo log where appropriate Created: 2019-12-22  Updated: 2021-12-23  Resolved: 2020-01-05

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.5.1

Type: Task Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-18115 Remove dummy tablespace for the redo log Closed
Relates
relates to MDEV-14425 Change the InnoDB redo log format to ... Closed
relates to MDEV-22177 more fsync() -> fdatasync() in InnoDB Closed

 Description   

Redo log files are fixed size files. They're almost never renamed. So, metadata is not changed. For such cases we can use `fdatasync()` which doesn't flush metadata, like `fsync()` does. That should bring use some performance.



 Comments   
Comment by Marko Mäkelä [ 2019-12-23 ]

MDEV-14425 may introduce a format option for append-only log files. For that option, we may need to use fsync(). For the circular files, fdatasync() indeed seems sensible. Not having an up-to-date timestamps on the redo log files should not matter much.

Edit: fdatasync() (as well as opening a file in O_DSYNC mode) does update the file size and allocation metadata. We would only need fsync() if we cared about file timestamps.

Generated at Thu Feb 08 09:06:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.