mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-06 01:50:57 -05:00
When `prevent_unoptimized=true` and `wait=true`, the update worker blocks in `wait_for_deferred_points_ready` until all deferred points are optimized. If the client specifies a timeout, `LocalShard::update` drops the oneshot receiver and returns `WaitTimeout` to the caller, but the update worker remains stuck in the wait loop. Since the worker processes operations sequentially, this causes head-of-line blocking for all subsequent updates on that shard. Fix this by passing the feedback oneshot sender into the wait function and checking `is_closed()` at the top of each loop iteration. When the caller's receiver is dropped (timeout), the wait breaks immediately, allowing the worker to proceed with the next operation. The data is already written to WAL and applied to segments before we enter the wait, so deferred points will still be optimized eventually by the background optimizer. Made-with: Cursor Co-authored-by: Cursor Agent <agent@cursor.com>