]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5046: FreeBSD lacks open(2) O_DSYNC flag (#623)
authorAmos Jeffries <yadij@users.noreply.github.com>
Tue, 5 May 2020 13:57:24 +0000 (13:57 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 5 May 2020 16:53:05 +0000 (16:53 +0000)
commitd4190e1e60caf402ec9234d64ce589007a9e98e1
tree3655d4d697d85a9c3769c6b501a6f07e67a0db7d
parent8433f1283239733d442db03b30c1efc96c7755a5
Bug 5046: FreeBSD lacks open(2) O_DSYNC flag (#623)

ext_session_acl built with TrivialDB uses O_DSYNC to ensure
thread-safe manipulation of data within the TDB files in Squid
multi-process environment.

FreeBSD lacks this flag entirely. Use the O_SYNC flag as a
backup, which apparently provides file-level synchronization.
It is not clear whether this flag will prevent duplicate keys or
record overwrites in the case of process write race collisions.

NP: this appears to be FreeBSD specific. Other BSD either define
O_DSYNC or lack support for these POSIX flags entirely.
src/acl/external/session/ext_session_acl.cc