mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-04 11:40:57 +08:00
Revert "Added version to reduce stale reads and writes and prepare for optimistic locking"
This reverts commit ef1209eaf4.
This commit is contained in:
@@ -359,11 +359,8 @@ HnswUpdateNeighborPages(Relation index, FmgrInfo *procinfo, Oid collation, HnswE
|
||||
/* Calculate index for update */
|
||||
startIdx = (hc->element->level - lc) * m;
|
||||
|
||||
/* TODO Skip when deleting */
|
||||
/* TODO Resolve issue with connections from element neighbor tuple */
|
||||
if (ntup->version != hc->element->version)
|
||||
idx = -1;
|
||||
else if (checkExisting && ConnectionExists(e, ntup, startIdx, lm))
|
||||
/* Check for existing connection */
|
||||
if (checkExisting && ConnectionExists(e, ntup, startIdx, lm))
|
||||
idx = -1;
|
||||
else if (idx == -2)
|
||||
{
|
||||
@@ -477,7 +474,7 @@ HnswAddDuplicate(Relation index, HnswElement element, HnswElement dup)
|
||||
}
|
||||
|
||||
/* Either being deleted or we lost our chance to another backend */
|
||||
if (i == 0 || i == HNSW_HEAPTIDS || etup->version != dup->version)
|
||||
if (i == 0 || i == HNSW_HEAPTIDS)
|
||||
{
|
||||
GenericXLogAbort(state);
|
||||
UnlockReleaseBuffer(buf);
|
||||
|
||||
Reference in New Issue
Block a user