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
backfill: handle transaction retry for vector index backfill
Previously, when backfilling a vector index, a transaction retry would
cause backfill failure because the vector index backfill writer would
overwrite the values read by the backfill reader with what it wanted to
push down to KV so as to avoid new allocations. This worked well so long
as there were no transaction retries but would fail to re-encode the
index entry on a retry because the writer lost access to the unquantized
vector. The quantized vector cannot be reused on a transaction retry
because fixups may cause the target partition to change.
This patch creates a scratch rowenc.IndexEntry in the backfill helper to
store the input vector entry. Before attempting to write the entry, we
copy the input IndexEntry to the scratch entry and use that to re-encode
the vector, which is still modified in place to limit new allocations.
Additionally, this patch switches the writer from using CPut() to
CPutAllowingIfNotExists() so that if the backfill job restarts, we don't
see the partially written index and fail due to duplicate keys.
Informs: #143107
Release note: None
0 commit comments