Skip to content

Conversation

@nithingovindugari
Copy link

@nithingovindugari nithingovindugari commented Oct 7, 2025

Document is getting deleted when we delete one chunk multi chunked document


Important

Fix document deletion bug in management_service.py to only delete documents if no chunks remain.

  • Bugfix:
    • In management_service.py, fix document deletion logic in delete_documents_and_chunks_by_filter().
    • Only delete document if no chunks remain, preventing accidental deletion when deleting a single chunk from a multi-chunk document.

This description was created by Ellipsis for 805a8e7. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 805a8e7 in 43 seconds. Click for details.
  • Reviewed 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. py/core/main/services/management_service.py:197
  • Draft comment:
    Good fix: adding a check to ensure the document is only deleted if no chunks remain. The inline comment is clear.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. py/core/main/services/management_service.py:199
  • Draft comment:
    Ensure conversion of doc_id to string matches the database schema for document_id fields.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. py/core/main/services/management_service.py:205
  • Draft comment:
    For performance, consider batching these chunk count queries if many documents are processed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_wGYux10aiJ8bLDuC

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant