Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ OBJS = src/backend/age.o \
src/backend/utils/ag_func.o \
src/backend/utils/graph_generation.o \
src/backend/utils/cache/ag_cache.o \
src/backend/utils/cache/agehash.o \
src/backend/utils/load/ag_load_labels.o \
src/backend/utils/load/ag_load_edges.o \
src/backend/utils/load/age_load.o \
Expand All @@ -153,6 +154,7 @@ REGRESS = scan \
graphid \
agtype \
agtype_hash_cmp \
agehash \
catalog \
cypher \
expr \
Expand Down
10 changes: 10 additions & 0 deletions age--1.7.0--y.y.y.sql
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,13 @@ BEGIN
END LOOP;
END;
$$;

-- Internal selftest for the agehash open-addressing hashtable. Returns "OK"
-- on success or "FAIL: ..." with a diagnostic message. Intended for the
-- agehash regression test only.
CREATE FUNCTION ag_catalog._agehash_self_test()
RETURNS text
LANGUAGE c
VOLATILE
PARALLEL UNSAFE
AS 'MODULE_PATHNAME';
14 changes: 14 additions & 0 deletions regress/expected/agehash.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* agehash internal selftest.
*
* Exercises the Robin Hood open-addressing hashtable used by AGE's hot-path
* caches at boundary sizes (1, 7, 8, 9, 63, 64, 65, 1024, ...) and across
* grow thresholds. A success returns the literal "OK"; any failure returns
* "FAIL: <reason>" describing the offending case.
*/
SELECT ag_catalog._agehash_self_test();
_agehash_self_test
--------------------
OK
(1 row)

9 changes: 9 additions & 0 deletions regress/sql/agehash.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* agehash internal selftest.
*
* Exercises the Robin Hood open-addressing hashtable used by AGE's hot-path
* caches at boundary sizes (1, 7, 8, 9, 63, 64, 65, 1024, ...) and across
* grow thresholds. A success returns the literal "OK"; any failure returns
* "FAIL: <reason>" describing the offending case.
*/
SELECT ag_catalog._agehash_self_test();
10 changes: 10 additions & 0 deletions sql/age_main.sql
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ CREATE FUNCTION ag_catalog._label_id(graph_name name, label_name name)
PARALLEL SAFE
AS 'MODULE_PATHNAME';

-- Internal selftest for the agehash open-addressing hashtable. Returns "OK"
-- on success or "FAIL: ..." with a diagnostic message. Intended for the
-- agehash regression test only.
CREATE FUNCTION ag_catalog._agehash_self_test()
RETURNS text
LANGUAGE c
VOLATILE
PARALLEL UNSAFE
AS 'MODULE_PATHNAME';

--
-- utility functions
--
Expand Down
Loading
Loading