tarantool/tarantool

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

Open

#10.784 geöffnet am 5. Nov. 2024

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Lua (406 Forks)batch import
buggood first issue

Repository-Metriken

Stars
 (3.633 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 13T 2h) (82 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide