tarantool/tarantool

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

Open

#10 784 ouverte le 5 nov. 2024

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Lua (406 forks)batch import
buggood first issue

Métriques du dépôt

Stars
 (3 633 stars)
Métriques de merge PR
 (Merge moyen 13j 2h) (82 PRs mergées en 30 j)

Description

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.

Guide contributeur