Repository navigation
feat(memgraph): use composite indexes and validate Memgraph 3.14 - #397
alexander-belikov merged 3 commits into
Conversation
|
All contributors to this pull request have accepted the Growgraph CLA. Thank you! |
|
I have read the Growgraph CLA and I accept it. |
|
Hi @alexander-belikov, this PR is now ready for review. Could you take a look when you have a chance? It adds native composite vertex indexes for Memgraph, retries failed automatic index creation, and updates the Docker default to 3.14.0. CI is green, including the integration suite on Memgraph 3.7.1, 3.13.1 and 3.14.0, and the CLA check passes. Thanks! |
|
@JulienDbrt , thanks!! Merging this. I pushed one commit on top: dropped the Memgraph CI workflow (we don't run live DB suites in CI) and trimmed the changelog and docs to our house style. Code and tests are yours. A follow-up brings FalkorDB and the other backends to the same composite-index contract. It also moves Memgraph's write-time index creation into define_indexes, the way the other backends work, so the retry path goes away there. |
The Memgraph connector already passes its existing integration suite on 3.14.0, but it still splits every multi-field vertex index into separate single-property indexes. This change preserves the declared field group and order using Memgraph's native composite indexes, for both schema-defined indexes and automatic MERGE indexes. For example,
[tenant, id]now createsCREATE INDEX ON :Label(tenant, id).Failed automatic index creation is no longer cached as success: ingestion continues and a later batch retries the DDL. Existing indexes are accepted without repeated creation attempts, and cursors used to create vertex indexes close on success and failure.
The Docker default moves from 3.13.1 to 3.14.0. A scoped, manually runnable GitHub Actions workflow checks the Memgraph suite against 3.7.1 (the original connector baseline), 3.13.1 and 3.14.0. Documentation and the changelog describe the new index behavior. Relationship indexes keep their existing per-field behavior; existing database indexes are not removed.
Validation performed locally with Python 3.11.13, uv 0.12.21 and the locked dependencies (including pymgclient 1.6.0):
uv run --frozen pytest test/db/memgraphs: 175 passed, 21 performance cases skipped on each of Memgraph MAGE 3.7.1, 3.13.1 and 3.14.0, using fresh instances in their default in-memory mode.uv run --frozen pytest test --ignore=test/db -n 4 --dist loadfile: 5,099 passed, 13 skipped.uv run --frozen pre-commit run --all-files: passed, including Ruff, ty and formatting.Regression tests cover composite identities and secondary indexes, repeated schema definition, partial-key collisions, updates that preserve other properties, uniqueness enforcement, field-group caching, identifier escaping and retry after failed index creation. The live suite completes in under four seconds per version locally; benchmarks remain opt-in.