Skip to content

async graph build not re-triggered for embeddings added during an ongoing build #3683

Description

@lekmaneb

Hi,

Issue linked with #3679 and its fix e1a46b2.

So while a building graph, if we inject more than 1k embeddings and wait for the end of building, the next call that should trigger async graph build doesn't trigger it.

To reproduce the bug, use this backup db bombardinocrocodilo (same as the one in #3679) and this script that will inject 2k embeddings when called :

import requests
import random

vector = [random.random() for _ in range(1024)]
vector_str = "[" + ",".join(str(v) for v in vector) + "]"

for i in range(2000):
    response = requests.post(
        "http://localhost:2480/api/v1/command/XXX", #<---- your db name
        json={
            "language": "sql",
            "command": f"INSERT INTO CHUNK_EMBEDDING (vector) VALUES ({vector_str})"
        },
        auth=("root", "rootroot")
    )
    print(i)

Steps :

  • Inject at least 1k embeddings (here the script does 2k)
  • Call for vector neighbors with a 1024 size vector -> this should trigger async rebuild graph in console
  • While graph is building, inject again embeddings using the script
  • Wait for the building to finish and call again for vector neighbors -> no async rebuild is triggered

Best regards,

Malek

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions