Skip to content

feat(memgraph): use composite indexes and validate Memgraph 3.14 - #397

Merged
alexander-belikov merged 3 commits into
growgraph:mainfrom
JulienDbrt:fix/memgraph-3.14-compatibility
Oct 28, 2026
Merged

alexander-belikov merged 3 commits into
growgraph:mainfrom
JulienDbrt:fix/memgraph-3.14-compatibility

Conversation

@JulienDbrt

Copy link
Copy Markdown
Contributor

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 creates CREATE 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.
  • Actionlint validated the new workflow; its health command was checked against a running server and a refused connection.

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.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

All contributors to this pull request have accepted the Growgraph CLA. Thank you!

@JulienDbrt

Copy link
Copy Markdown
Contributor Author

I have read the Growgraph CLA and I accept it.

@JulienDbrt
JulienDbrt marked this pull request as ready for review October 28, 2026 18:13
@JulienDbrt

Copy link
Copy Markdown
Contributor Author

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!

@alexander-belikov

Copy link
Copy Markdown
Member

@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.

@alexander-belikov
alexander-belikov merged commit 5ea90a5 into growgraph:main Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants