Skip to content

Add "query graph DB" to gitlab-zoekt-indexer webservice

This is the next step after we allow zoekt nodes to create graph DBs (#79 (closed)).

Extend gitlab-zoekt-indexer webservice with endpoint(s) for querying graph DBs:

  • it accepts a Cypher query and a repository identifier
  • opens read-only connection to Kuzu DB
  • manages a pool of opened DB connections - to minimize latency caused by opening DB connection, we should keep open connections for recently used DBs. Note: implementation of DB pool connection is tracked in #92 (moved), so in scope of this issue just a very basic logic is enough
  • sets query timeout (e.g. to 15s) to eliminate long-running queries

gitlab#534843 (closed) contains details about previous measurements/testing, may be useful for choosing proper memory buffer size, max number of connections,...

Edited by Jan Provaznik