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
150573: vecindex: fix and enhance vecindex testing r=drewkimball a=andy-kimball
#### vecindex: add datadriven tests for vecindex
Refactor the C-SPANN datadriven tests so they can be shared by other
Store implementations. Add new datadriven test for vecindex that
tests recall for several interesting datasets.
#### cspann: fix bug in CalculateTruth
Fix bug in CalculateTruth, which was calling vecpb.MeasureDistance with
un-normalized vectors for Cosine distance. This returns incorrect results.
#### vecindex: fix determinism violations
Fix a couple cases where the vector index is not behaving
deterministically even when configured to do so. In one case, partition
keys were not generated deterministically. In the other case, the seed
used in crdb_test builds was different than the seed used otherwise.
#### builtins: add process_vector_index_fixups builtin
Add a new builtin function that waits until all pending fixups have
been processed for a given index. This is used for testing.
Previously, we were processing fixups in deterministic tests by calling
ProcessFixups just before inserting vectors or searching for them.
However, that was causing deadlocks, because fixups were being processed
in the same transaction that was updating the index.
The vector_index test is now updated to call the new builtin when it
needs to force fixup processing.
#### cspann: use brackets to format vectors
Postgres uses brackets to format vectors, e.g. [1, 2]. However, our test
code currently uses parentheses, e.g. (1, 2). Update our tests to use
brackets instead, so that we're more consistent.
Co-authored-by: Andrew Kimball <[email protected]>
0 commit comments