Skip to content

Oracle vector store returns failed inserts as stored #43296

Description

@ericdelorefice

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

main at 1a918ea (api 1.17.1)

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

With the Oracle vector store, make one INSERT inside OracleVector.add_texts fail, for example a dropped connection happens. The current and existing unit test test_add_texts_inserts_and_logs_on_failures does this but with a mocked cursor: the second insert raises, and add_texts still returns both ids.

✔️ Expected Behavior

add_texts raises when an insert fails. Most of the other vector stores have no handler around their own writes, so the error instead reaches the caller.

❌ Actual Behavior

The error is logged and dropped, and the id will come back as if the row was stored. When a segment is edited, dify deletes the old vector first and then it will call add_texts. If the insert fails, the segment then stays marked completed with no vector, and it stops showing in retrieval. The segment update already has an except that marks the segment as failed, but error never reaches.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    review: mediumghfind author score; see https://ghfind.com

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions