Fix duplicate neighbors race between HNSW INSERT and VACUUM (#1010)
This fixes a race condition where concurrent INSERT and VACUUM processes can write the same element into a neighbor array twice, causing duplicate neighbors and wasting fixed node out-degree capacity. The issue happens because INSERT performs blind writes. If a concurrent VACUUM discovers the newly inserted element via its first bridge edge, VACUUM safely writes the connection first. When INSERT resumes, it blindly overwrites it. This change removes the 'checkExisting' flag, making sure that existing neighbors are always checked before inserting a new node.
U
upenderbh committed
3b72e5b524d8c8140e47c6886aaed7d534495917
Parent: 4f3d17f
Committed by GitHub <noreply@github.com>
on 8/4/2026, 11:52:49 AM