dust-tt / dust

Amplify your team's potential with customizable and secure AI assistants.
https://dust.tt
MIT License
978 stars 109 forks source link

fix: deadlock in notion getParents #8813

Closed fontanierh closed 1 day ago

fontanierh commented 1 day ago

Description

Now that we lock in cacheWithRedis, re-entrant calls can produce deadlocks. A corner case in Notion getParents can cause this, when there is a cycle in the graph.

We already have a condition to handle this: if (seen.includes(myId)) { return } else { recursion(myParentId }

but with this new locking mechanism, we need the condition to be: if (seen.include(myParentId) { return } else { recursion(myParentId }

in order to avoid deadlocking.

Risk

N/A

Deploy Plan

deploy connectors