Avatar for the Eventual-Inc user
Eventual-Inc
Daft
BlogDocsChangelog

Performance History

Latest Results

fix: fd and thread leak from tqdm progress bar in Jupyter (#7262)
main
3 hours ago
docs: simplify writer-thread comment per review feedback
yk/fix-progress-bar-fd-leak
3 hours ago
fix(daft-file): release GIL in PyDaftFile methods to prevent deadlock (#7257) PyDaftFile's #[pymethods] (_from_file_reference, read, seek, _supports_range_requests) and PyFileReference::__enter__ hold the Python GIL while calling block_within_async_context, which blocks via rx.recv() waiting for async S3 I/O on DAFTIO tokio threads. When concurrent scan tasks need the GIL on the same DAFTIO threads (via Python::attach), all threads deadlock — the GIL holder waits for a DAFTIO thread to execute the S3 request, while all DAFTIO threads wait for the GIL. The fix wraps the blocking I/O calls in py.detach() to release the GIL before blocking, following the existing pattern used by the exists() method in the same file. For read() and seek(), cursor ownership is temporarily moved into the detach closure via take() and restored after completion. Deadlock conditions: Ray distributed mode + multiple concurrent scan tasks per worker + S3 latency >= ~50ms + DAFTIO threads >= 8 (os.cpu_count() >= 8). The official AWS benchmark (4 vCPU, S3 <1ms) does not trigger this due to low thread count and latency. ## Changes Made Modified `src/daft-file/src/python.rs` — added `py.detach()` to 5 methods that hold the GIL while calling `block_within_async_context`: - `PyFileReference::__enter__`: added `py: Python<'_>`, wrapped `load_blocking()` in `py.detach()` with cloned `FileReference`. - `PyDaftFile::_from_file_reference`: same pattern — clone data, `py.detach()`, call `load_blocking()` inside. - `PyDaftFile::read`: added `py: Python<'_>`, used `cursor.take()` to move cursor into `py.detach()` closure (Rust ownership requirement), performed read without GIL, restored cursor after completion. - `PyDaftFile::seek`: same take/restore pattern as `read()`. - `PyDaftFile::_supports_range_requests`: added `py: Python<'_>`, wrapped `block_within_async_context` call in `py.detach()` with cloned `uri` and `source`. All changes follow the existing `py.detach()` pattern used by `exists()` at line 102 in the same file. No behavioral changes — same inputs, same outputs, only the GIL hold timing differs. ## Related Issues Closes #7256 --------- Co-authored-by: zhouwenjia.zwj <zhouwenjia.zwj@alibaba-inc.com>
main
3 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix: fd and thread leak from tqdm progress bar in Jupyter#7262
3 hours ago
666740b
yk/fix-progress-bar-fd-leak
CodSpeed Performance Gauge
0%
docs(benchmark): add hand-tracking workload A/B benchmark for lerobot batched decode#7267
4 hours ago
1d4816c
yk/lerobot-hand-tracking-bench
CodSpeed Performance Gauge
0%
5 hours ago
943472e
chuqCTC:fix/escape-sql-string-literals
© 2026 CodSpeed Technology
Home Terms Privacy Docs