Skip to content

fix(episodic): catch LanceError in router search, degrade gracefully (#160)#163

Open
relunctance wants to merge 1 commit intoFlowElement-ai:mainfrom
relunctance:fix/lancedb-invalid-range-error
Open

fix(episodic): catch LanceError in router search, degrade gracefully (#160)#163
relunctance wants to merge 1 commit intoFlowElement-ai:mainfrom
relunctance:fix/lancedb-invalid-range-error

Conversation

@relunctance
Copy link
Copy Markdown

Fix: LanceDB search fails with Invalid range error (#160)

Problem: Episodic router crashes with LanceError(IO): Generic memory error: Invalid range 0..0 for object of size 0 bytes when searching Episode_summary/Facet_search_text/Facet_anchor_text tables that are empty or corrupted.

Root cause: LanceDB raises this error when searching an empty table or a table with corrupted data (0-byte objects). This is not caught by the existing _search_collection exception handler.

Solution: Add lancedb.LanceError to the exception handling in _search_collection:

When this error occurs, episodic routing degrades to creating a new Episode instead of crashing. This is safe since the ingested data is still in LanceDB — only the routing decision is affected.

Closes #160

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.

P0: LanceDB IO 错误 — Invalid range 0..0 for object of size 0 bytes

1 participant