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 }
Description
Now that we lock in
cacheWithRedis
, re-entrant calls can produce deadlocks. A corner case in NotiongetParents
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