发布

  • fix: batch large sql statements during delete (#2586)

    frostbyte_neo 发布于 2026-04-16 23:28:37 +00:00

    Description

    We had issues in relational dbs, especially SQLite, when deleting large
    documents. This was due to a large query being created when deleting
    entries in the GraphRelationshipLedger. We were exceeding the query
    depth limit.

    This PR fixes the issue by batching the queries, avoiding creation of
    queries whose tree exceeds the depth limit.

    Acceptance Criteria

    Type of Change

    • Bug fix (non-breaking change that fixes an issue)
    • New feature (non-breaking change that adds functionality)
    • Code refactoring
    • Other (please specify):

    Screenshots

    Pre-submission Checklist

    • I have tested my changes thoroughly before submitting this PR
      (See CONTRIBUTING.md)
    • This PR contains minimal changes necessary to address the
      issue/feature
    • My code follows the project's coding standards and style
      guidelines
    • I have added tests that prove my fix is effective or that my
      feature works
    • I have added necessary documentation (if applicable)
    • All new and existing tests pass
    • I have searched existing PRs to ensure this change hasn't been
      submitted already
    • I have linked any relevant issues in the description
    • My commits have clear and descriptive messages

    DCO Affirmation

    I affirm that all code in every commit of this pull request conforms to
    the terms of the Topoteretes Developer Certificate of Origin.

    Summary by CodeRabbit

    Release Notes

    • Refactor
    • Improved performance of legacy data operations through internal query
      optimization.
    下载附件