tarantool/tarantool
GitHub で見る`O_DSYNC` should be used instead of `O_SYNC` for WAL files when available
Open
#10,784 opened on 2024年11月5日
buggood first issue
Repository metrics
- Stars
- (3,633 stars)
- PR merge metrics
- (平均マージ 13d 2h) (30d で 82 merged PRs)
説明
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.