Self Checks
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.
Self Checks
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_textsfail, for example a dropped connection happens. The current and existing unit testtest_add_texts_inserts_and_logs_on_failuresdoes this but with a mocked cursor: the second insert raises, andadd_textsstill returns both ids.✔️ Expected Behavior
add_textsraises 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.