Skip to content

fix: add delete_by_filter_async to InMemoryDocumentStore - #13356

Open
kerthans wants to merge 1 commit into
deepset-ai:mainfrom
kerthans:fix/inmemory-delete-by-filter-async
Open

kerthans wants to merge 1 commit into
deepset-ai:mainfrom
kerthans:fix/inmemory-delete-by-filter-async

Conversation

@kerthans

Copy link
Copy Markdown

Related Issues

Proposed Changes:

InMemoryDocumentStore exposes an async counterpart for every public method (update_by_filter_async, count_documents_by_filter_async, delete_all_documents_async, ...), except delete_by_filter. The shared DeleteByFilterAsyncTest mixin in haystack/testing/document_store_async.py already exists, but it was not mixed into TestMemoryDocumentStore, so the gap went unnoticed.

This PR:

  • adds InMemoryDocumentStore.delete_by_filter_async(filters) -> int, which runs the existing sync delete_by_filter in the store's thread-pool executor, following the same pattern as update_by_filter_async;
  • adds DeleteByFilterAsyncTest to TestMemoryDocumentStore;
  • adds a release note.

How did you test it?

  • Added DeleteByFilterAsyncTest first and confirmed the new tests failed with AttributeError: 'InMemoryDocumentStore' object has no attribute 'delete_by_filter_async'.
  • After the implementation: pytest test/document_stores/test_in_memory.py → 384 passed, 8 skipped (the new tests run for both the shared and non-shared store test classes).
  • ruff check ., ruff format --check ., codespell, reno lint, and mypy on the changed modules pass.

Notes for the reviewer

The change is purely additive and delegates to the existing sync delete_by_filter, so filter validation and ValueError behavior are identical.

AI assistance was used to prepare this change; I reviewed and tested it.

Checklist

@kerthans
kerthans requested a review from a team as a code owner October 21, 2026 05:16
@kerthans
kerthans requested review from bogdankostic and removed request for a team October 21, 2026 05:16
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@kerthans is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@HaystackBot

Copy link
Copy Markdown
Contributor

Hi @kerthans, thanks a lot for your contribution! 🙏

We noticed that the Contributor License Agreement (CLA) check (license/cla) hasn't passed yet, so we've temporarily moved this PR to draft and paused the review assignment.

To get your PR reviewed, please sign the CLA via the link in the license/cla check below (or in the CLA bot comment). As soon as the check turns green, this PR will automatically be marked ready for review again and a reviewer will be re-assigned.

@HaystackBot
HaystackBot removed the request for review from bogdankostic October 21, 2026 06:45
@HaystackBot HaystackBot added the cla-pending PR is in draft until the contributor signs the CLA label Oct 21, 2026
@HaystackBot
HaystackBot marked this pull request as draft October 21, 2026 06:45
@CLAassistant

CLAassistant commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@HaystackBot
HaystackBot marked this pull request as ready for review October 21, 2026 11:29
@HaystackBot HaystackBot removed the cla-pending PR is in draft until the contributor signs the CLA label Oct 21, 2026
@HaystackBot

Copy link
Copy Markdown
Contributor

Thanks for signing the CLA, @kerthans! 🎉 This PR is now ready for review again and the reviewer has been re-assigned.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants