unibaraU
Convex Community2y ago
3 replies
unibara

Uncaught Error: Documents read from or written to the "itineraries" table changed while this mut...

Is it bad practice to stream from 3 different threads from an LLM and then run respective mutations to update the same document (at the same time)? Seems there are some 'Error managing thread' errors appearing. Could imagine storing references to 3 different documents instead, but would ideally keep this structure.

Full error:

Uncaught Error: Documents read from or written to the "itineraries" table changed while this mutation was being run and on every subsequent retry. Another call to this mutation changed the document with ID "j57bsqexd56n4fnee9y4k2v1dx6s1e46". See https://docs.convex.dev/error#1
    at async recursiveStreamHandler (../convex/openai_v2.ts:264:64)
    at async recursiveStreamHandler (../convex/openai_v2.ts:307:12)
    at async handler (../convex/openai_v2.ts:92:8)
Was this page helpful?