tarantool/tarantool

`O_DSYNC` should be used instead of `O_SYNC` for WAL files when available

Open

#10,784 建立於 2024年11月5日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Lua (406 fork)batch import
buggood first issue

倉庫指標

Star
 (3,633 star)
PR 合併指標
 (平均合併 13天 2小時) (30 天內合併 82 個 PR)

描述

Currently, we always use O_SYNC for ensuring for write integrity: https://github.com/tarantool/tarantool/blob/8806b7b561d58d1cef79e6c9c723827f4ce67ed8/src/box/wal.c#L441-L442

However, we only need data integrity guarantees, so O_DSYNC is sufficient, when it is available. We even have a legacy macro defined for this: https://github.com/tarantool/tarantool/blob/8806b7b561d58d1cef79e6c9c723827f4ce67ed8/src/trivia/config.h.cmake#L107-L115

It seems like there was a refactoring during which this logic was lost.

貢獻者指南