Skip to content

Commit

Permalink
Make sure memory-exceeded warnings are triggered in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngalstyan4 committed Oct 15, 2023
1 parent 67aa982 commit 0839adb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hnsw/external_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ void *ldb_wal_index_node_retriever(void *ctxp, int id)
NULL,
NULL,
0,
"Pinned more tuples during node retrieval than will fir in work_mem, cosider increasing work_mem");
"pinned more tuples during node retrieval than will fit in work_mem, cosider increasing work_mem");
#endif
fa_cache_insert(&ctx->fa_cache, id, nodepage->node);

Expand Down
6 changes: 5 additions & 1 deletion test/sql/hnsw_insert.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---------------------------------------------------------------------
-- Test HNSW index inserts on empty table
---------------------------------------------------------------------
set work_mem = '10MB';
-- set an artificially low work_mem to make sure work_mem exceeded warnings are printed
set work_mem = '64kB';

CREATE TABLE small_world (
id SERIAL PRIMARY KEY,
Expand All @@ -20,6 +21,9 @@ INSERT INTO small_world (v) VALUES ('{1,1,1,1}');

DROP TABLE small_world;

-- set work_mem to a value that is enough for the tests
set work_mem = '10MB';

---------------------------------------------------------------------
-- Test HNSW index inserts on non-empty table
---------------------------------------------------------------------
Expand Down

0 comments on commit 0839adb

Please sign in to comment.