[MDEV-23076] Misleading "Innodb: using atomic writes" Created: 2020-07-02 Updated: 2021-03-22 Resolved: 2021-03-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.0.11, 10.1.0, 10.2.0, 5.5, 10.3.0, 10.4.0, 10.5.0 |
| Fix Version/s: | 10.2.38, 10.3.29, 10.4.19, 10.5.10, 10.6.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vladislav Vaintroub | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
"InnoDB: using atomic writes." is always printed, with fprintf, different in formatting to anything else. The message is misleading.
|
| Comments |
| Comment by Marko Mäkelä [ 2020-07-03 ] | |||||||||||||||||||
|
It turns out that the message output has not been changed ever since you introduced it in | |||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2020-07-03 ] | |||||||||||||||||||
|
I think you need to fix it for when it was introduced outside of Fusion IO. The thing is Innodb is NOT using atomic writes, but it says it does. In the past it at least would complain if you tried to use them, and it did not work. | |||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-22 ] | |||||||||||||||||||
|
wlad, indeed, the message is misleading. Even if the global variable srv_use_atomic_writes were set, we would still invoke my_test_if_atomic_write() to check if writes are atomic with a particular page size. When using the default innodb_page_size=16k, page writes should be atomic on NTFS when using ROW_FORMAT=COMPRESSED and KEY_BLOCK_SIZE<=4. I think that we must also remove some other nonsense, because innodb_file_per_table is a dynamic parameter.
| |||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-03-22 ] | |||||||||||||||||||
|
Page writes can only be atomic on Windows (they do not mention NTFS | |||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-22 ] | |||||||||||||||||||
|
Furthermore, the documentation string of innodb_use_atomic_writes was referring to deprecated options. I corrected that. I think that we should probably deprecate and ignore this parameter, and just make use of atomic writes when they are available. | |||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2021-03-22 ] | |||||||||||||||||||
|
I agree that we should just do atomic writes (i.e skip doublewrite), if atomic is detected. | |||||||||||||||||||
| Comment by Marko Mäkelä [ 2021-03-22 ] | |||||||||||||||||||
|
wlad, on 10.2 and 10.3, it seems to me that my_may_have_atomic_write should always be 0 on other systems than Linux. It is unclear to me how that message could have been output on Microsoft Windows. |