Hi all, long time no type.
TL;DR: Does ignition hold a lock while resolving tagProvider.getTagConfigsAsync("[$provider.name]", recursive=true, local=false)
?
I'm revisiting some code which we use in a plugin to analyze the entire gateway configuration tag space, running provider-by-provider.
We've seen experientially that while I'm running a scan of all tags, it seems to put a lot of load on the gateway of some sort, because the rest of the system runs into timeouts reading & writing to tags. I theorize that this is because the gateway is holding a sqlite table lock (or lots of row locks or or or) while doing these resolutions, so when we get to a vary large deep provider, it spends a long time recursively flattening the whole object, and that causes problems elsewhere.
The whole process takes about 180s to complete, so the performance gaps while this is happening are Not Great!
Standard metrics (thread pools I can monitor, cpu, ram, jvm gc etc) all seem fine.
Using that theory ("recursive=true holds a resource for too long, split the work up!"), I started exploring using the browseAsync
api instead, but for my purposes I think that it's not suitable.
We use custom attributes on tags pretty heavily, and they don't come through the browse API at all. And I don't think that there's a path towards using getTagConfigsAsync
without recursive=true
because -- as far as I can tell -- there's no way to get tags under a path with it, just tags at a path.
Ignition 8.1.35 for API purposes, but this is important, if I need to upgrade I'll make it happen
Any advice appreciated!