Skip to content

v0.6.112

Choose a tag to compare

@jgowdy-godaddy jgowdy-godaddy released this 09 Jun 14:56
c713ebe

Language binding concurrency fixes

This release corrects a 2026-05-05 review change (T5, #257) that released the
interpreter lock on the sync encrypt/decrypt hot path in the Ruby and
Python bindings. For warm-cache (sub-microsecond) operations the lock
release/reacquire dominates the work and collapses multi-threaded throughput.

  • Ruby (#330) — Remove blocking: true from sync encrypt/decrypt
    (restores the Cobhan-era behavior; ~4x multi-threaded throughput recovery).
    Also drops blocking: true from the async enqueue functions, which only
    spawn onto the tokio runtime and never hold the GVL for I/O. Factory/config
    init and the log/metrics hook set/clear functions keep blocking: true
    (long/rare I/O and deadlock avoidance, respectively).

  • Python (#331) — Remove py.detach (GIL release) from sync
    encrypt/decrypt. Benchmarked at ~3-4x faster at 4-8 threads with parity
    single-threaded; the prior code showed negative thread scaling.

Callers needing concurrency across DB/KMS-bound cache misses should use the
async APIs (encrypt_async/decrypt_async in Ruby,
encrypt_bytes_async/decrypt_bytes_async in Python), which run on the tokio
runtime off the interpreter lock. Node was unaffected (its T5 change was
docs-only).