From dc8d467ba59295ddf8e6ce83907aee1281dfcb48 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 13 Aug 2023 13:46:06 -0700 Subject: [PATCH] Improved HNSW vacuum recall test --- test/t/016_hnsw_vacuum_recall.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/t/016_hnsw_vacuum_recall.pl b/test/t/016_hnsw_vacuum_recall.pl index eb0d4f7..35548aa 100644 --- a/test/t/016_hnsw_vacuum_recall.pl +++ b/test/t/016_hnsw_vacuum_recall.pl @@ -61,10 +61,10 @@ $node->safe_psql("postgres", ); # Add index -$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v vector_l2_ops);"); +$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v vector_l2_ops) WITH (m = 4);"); # Delete data -$node->safe_psql("postgres", "DELETE FROM tst WHERE i > 5000;"); +$node->safe_psql("postgres", "DELETE FROM tst WHERE i > 2500;"); # Generate queries for (1 .. 20) @@ -86,11 +86,12 @@ foreach (@queries) push(@expected, $res); } -test_recall(0.40, $limit, "before vacuum"); -test_recall(0.99, 60, "before vacuum"); +test_recall(0.20, $limit, "before vacuum"); +test_recall(0.95, 100, "before vacuum"); +# TODO test concurrent inserts with vacuum $node->safe_psql("postgres", "VACUUM tst;"); -test_recall(0.99, $limit, "after vacuum"); +test_recall(0.95, $limit, "after vacuum"); done_testing();