Skip to content

Commit

Permalink
Add guidance on using O_DIRECT option to bypass Mountpoint's caches
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Carl Jones <[email protected]>
  • Loading branch information
dannycjones committed Nov 14, 2023
1 parent db1aede commit e9911a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ Mountpoint caching can be further configured,
such as adjusting the metadata time-to-live (TTL) or the maximum space allowed to be used by the data cache.
Review the caching options available using `mount-s3 --help`.

To avoid using the cache, an application can use the `O_DIRECT` option (or language equivalent) when opening a file for reading.
When this option is provided, Mountpoint will check for the latest object in S3 and read object content from S3 rather than cached data.

> [!WARNING]
> Caching relaxes the strong read-after-write consistency offered by Amazon S3 and Mountpoint in its default configuration.
> See the [consistency and concurrency section of the semantics documentaton](./SEMANTICS.md#consistency-and-concurrency) for more details.
Expand Down

0 comments on commit e9911a1

Please sign in to comment.