Skip to content

[BUG] RecordManager Does Not Properly Cleanup Vector Store's OLD VALUESΒ #3570

@dkindlund

Description

@dkindlund

Describe the bug
In Flowise, I've created a new Document Store where an Airtable Document Loader feeds data into a Postgres Vector Store. We're also using Postgres to store the Record Manager records. Whenever I update an existing record in Airtable and then proceed to perform the Upsert operation, I see the new vector store record created but the OLD vector store record still EXISTS. The OLD vector store record does not get properly deleted!

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Document Store
  2. Specify an Airtable Document Loader
  3. Specify a Postgres Vector Store and Record Manager (with Cleanup = FULL)
  4. Perform initial Upsert
  5. Change a single existing Airtable record
  6. Perform second Upsert
  7. Verify that BOTH the NEW and the OLD vector store records STILL exist in the vector store

Expected behavior
I would expect that Upserting would purge the OLD vector store record.

Screenshots
If applicable, add screenshots to help explain your problem.

Flow
If applicable, add exported flow in order to help replicating the problem.

Setup

  • Installation: docker
  • Flowise Version: 2.1.2
  • OS: Google Cloud Run Linux
  • Browser: chrome

Additional context
So my vector store table is named mechanisms_vec_v1 and my record manager table is named mechanisms_rm_v1. I THINK the way the deletion logic is supposed to work is a match on where mechanisms_vec_v1.id = mechanisms_rm_v1.key. HOWEVER, in my case, there is NO OVERLAP IN VALUES. For some reason, when a vector store document is inserted, that record's mechanisms_vec_v1.id IS NEVER THE SAME VALUE as it's corresponding mechanisms_rm_v1.key value.

Because of this, I think there's some sort of BUG between when the Airtable data gets loaded to when it gets added to the vector store -- specifically, I think the mechanisms_vec_v1.id computed value might NOT be getting set the same way as the mechanisms_rm_v1.key value.

It's exceptionally hard to figure out exactly where the bug is located, because of all the layers of indirection and use of langchain built-in libraries, but I hope these clues help, @HenryHengZJ . Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions