[MDEV-18235] Changes related to fsync() Created: 2019-01-14 Updated: 2019-01-25 Resolved: 2019-01-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.4.3, 10.2.22, 10.3.13 |
| Type: | Task | Priority: | Major |
| Reporter: | Eugene Kosov (Inactive) | Assignee: | Eugene Kosov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Various changes in fil. Mostly code simplification. |
| Comments |
| Comment by Eugene Kosov (Inactive) [ 2019-01-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Flame graph for this test:
It's hard to see fil in this graph. And it's hard to see the impact of a patch. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eugene Kosov (Inactive) [ 2019-01-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Benchmark results was added to PR, so I'm requesting another round of review. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2019-01-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I did some additional research, and did not find any evidence that fsync() would not be thread-safe on any POSIX-compliant file system. Maybe we should consider using the asynchronous I/O interface in the future, that is, IOCB_CMD_FSYNC instead of fsync() or IOCB_CMD_FDSYNC instead of fdatasync(). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eugene Kosov (Inactive) [ 2019-01-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
http://pubs.opengroup.org/onlinepubs/007904975/
Thus, fsync() shall be thread-safe by POSIX. |