Filesystem storage writes should write, fsync and rename

Description

Trying to work out why we’ve seen corruption in backups, I realised it’s possible that the filesystem Save() function writes directly to the final file name. For files such as incremental oplogs, it’s possible these writes could be interrupted (particularly if to CIFS/NFS) and there would be no way to tell from the filesystem.

It would be safer to do writes to a temporary file name, fsync, and then rename the file to the final name.

Environment

None

Activity

Aaditya Dubey 
June 7, 2024 at 12:16 PM

Hi

Thank you for the report.
It doesn't look like a bug; instead, we considered it an improvement.

Thank you for connecting with Percona!

Done

Details

Assignee

Reporter

Labels

Needs QA

Sprint

Fix versions

Priority

Created June 2, 2024 at 8:53 PM
Updated September 2, 2024 at 8:57 AM
Resolved August 19, 2024 at 7:52 AM

Flag notifications