Skip to content

Commit dfff1bb

Browse files
committed
the doc was outdated behavior
1 parent c8c605c commit dfff1bb

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

awscrt/s3.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,10 @@ class S3FileIoOptions:
186186
"""
187187
Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.
188188
189-
- Currently only Linux supports direct I/O. On unsupported platforms, the request transparently
190-
falls back to buffered I/O and a warning is logged.
191-
- Supported for both upload (send_filepath) and download (recv_filepath).
192-
- For upload, part_size MUST be page-aligned when direct_io is enabled (hard fail otherwise).
193-
The client controls part_size and is responsible for ensuring alignment.
194-
- For download, this is a best-effort optimization. The request transparently falls back to
195-
buffered I/O (logging a warning) if any of the following preconditions are not met:
196-
part_size is not page-aligned, recv_file_position is not page-aligned (WRITE_TO_POSITION),
197-
existing file size is not page-aligned (CREATE_OR_APPEND), or the last part has an
198-
unaligned length (only that part falls back).
189+
- This is a BEST-EFFORT optimization. The request transparently falls back to
190+
buffered I/O (logging a warning) on unsupported platforms or when alignment
191+
preconditions are not met (part_size not page-aligned, last part has unaligned
192+
length, etc).
199193
- Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html
200194
201195
In summary, O_DIRECT is a potentially powerful tool that should be used with caution.

0 commit comments

Comments
 (0)