Skip to content

delete_all() incorrectly calls reset(), deleting memories of all users instead of filtered ones #3928

@nooooonee

Description

@nooooonee

🐛 Describe the bug

The Memory.delete_all() method has a critical bug where it calls self.vector_store.reset()(https://github.com/mem0ai/mem0/blob/dba7f0458aeb50aa7078d36eaefa2405afbee620/mem0/memory/main.py#L1053C9-L1053C34) after deleting filtered memories. This causes the entire vector store collection to be dropped and recreated, deleting all memories for all users, not just the ones matching the provided filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions