Revert "Added version to reduce stale reads and writes and prepare for optimistic locking"

This reverts commit ef1209eaf4.
This commit is contained in:
Andrew Kane
2023-08-21 02:47:27 -07:00
parent 1301706d30
commit 02f4e0ec8b
4 changed files with 6 additions and 16 deletions

View File

@@ -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);