You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, constructMergeBatch() would get the mutex on memory
accounting once per batch to minimize the number of atomics needed to
perform memory accounting. With the addition of vector indexing, we now
need to perform KV operations in order to construct batches, which can
lead to deadlocks between KV and the memory accounting mutex.
This patch splits the mutex acquisition into two acquisitions, releasing
the mutex in between. Memory used is accumulated as merged entries are
built and then accounting is notified for the entire batch. This has the
effect of making the accounting lag behind allocation a bit, but that
seems preferable than paying the cost of a mutex acquisition for every
row merged.
Fixes: #155190
Release note (bug fix): A potential deadlock during vector index
creation has been corrected.
0 commit comments