we recently noticed LookupResources is
# spicedb
v
we recently noticed LookupResources is taking too long sometimes, apparently randomly. I just enabled otel trace collection and apparently all the traces have the same pattern: a large "nothing" after LookupNamespacesWithNames. Is this an expected behaviour? Is there some CPU intensive task after that span? Or maybe many allocations -> GC? https://cdn.discordapp.com/attachments/844600078948630559/1167474373087744071/image.png?ex=654e423d&is=653bcd3d&hm=e8ba5a3f94320083acaf88aca9be57e217d82f46d51b3753753ef67c75e92900&
SQL query is:
Copy code
"SELECT pg_current_snapshot();"
j
LookupResources is streaming; it won't return the first result until it finds it, and it does so by walking the graph backwards
v
sorry @Joey I'm not sure I understand. Do you mean it's actually doing something but not tracing it ? I'm not sure I've been crystal clear, since I cut the screenshot after the LookupNamespacesWithNames: there's nothing inside the spicedb call after that. The whole RPC takes ~125ms but I only see spans for the first ~15ms.
j
the spans likely are not connected for the async streaming response
3 Views