Uncertain_InitialValue for query tags after update from 8.1.45 to 8.1.55

Uncertain_InitialValue for query tags after update from 8.1.45 to 8.1.55

I intended to update all 6 gateways FrontEnd-Master and Backup, IO1-master and backup and IO2-master and backup

I started with IO2-backup and followed with it's master, but I have this problem on it and untill I do not find how to fix it, I do not dare to update the other IO servers.

all my query tags (that are part of UDT instances) are stuck in Uncertain_initialValue

I restarted the gateway (gwcmd -r) but does not help.

I have this kind of behaviour sometimes when copy-ing UDT instances, and know how to fix this on individual cases,
If I rename an rename back the instance, all components of that UDT instance starts to work. But now I have hundreds of these and even if I solve a few, when I restart the gateway, they stop working again.
I cheked all to have valid TagGrpup names on it (since I know ths can cause this phenomena), but even after correcting unavailable TagGroupNames, after a gateway restart, the working UDT instances tags (put to work by rename+renameBack) ar no longer working.
And even the ones that had valid TagGroups on them before the update are not working.

I think this is not necessary a version update bug, since this kind of scenarios I did encounter ocasionally, but isolated to the tags I worked at that point. OBS: 99.9% of all my tags are by UDT's

I even did a force Re-Sync after updating both master and backup gateways of IO2 and restarted master, but same thing happens

Not a permanent solution either to change something in each UDT definition each time I restart the gateway.

OBS: Since implementation 3 years ago, I deliberatley renamed the TagGroup Default to Default_ so I never use that by mistake.
In one UDT, an expression tat used these Query tag values was however left as Default. I changed itto an appropriate TagGroup, but did not help. and even the ones that were already set to a valid Tag Group are stuck in Uncertain_InitialValue

I even have an UDT instance that has a single tag as query tag on it with valud TagGroup before upgrade, but it too is stuck on Uncertain_InitialValue

The tag Group for these query tags (named "DBStaticData") is set to Mode=Direct, Rate=60000ms, DataMode=Polled

I did restart the gateway in the recent past without this happening. neither on IO1 or IO2

Please advise

What I noticed, that under diagnistics it says IsLeased true, however it is set to Direct and not leased by the Tag Group

I think I found the problem: Execution mode was set to Event Driven and not TagGroup. so if the database value never changes, it will not get a value on startup???

Changed Execution mode to TagGroup and it solved the problem.

let me restart the gateway and see if the problem is solved

My main problem is solved this way, but I ask my self (and you guys) now: setting the execution mode to Tag Group how to configure the tag group for these static db query values (that does not change ony ocasionally or never) in the way they do not necessarily reevaluate themselfs if these database values do not change over time only on some manual correction updates or new instances. I currently have it set to mode=Direct, Rate=60000ms, DataMode=Polled and the rest by default

especially that I run into another problem: (in the same UDT) i have two expression tags that use the query values. both expressions are EventDriven with another valid TagGroup, but only on eexression did evaluate automatically, and the other is stuck in Uncertain_InitialValue. I do not consider right to set an expression binding to set it to fixed tare or periodic via TagGroup. why could it not detect the event that it's expression components changed their state or value?

Even if I change the expression tag to FixedRate=20000ms it still does not evaluate. and the rename trick is not working for this expressions issue either. is stuck for good in Uncertain_InitialValue. even if the query tags are now working.

No ideas left how to fix this one

Why did query bindings work for years before the upgrade on gateway restarts and now they only work if their execution mode is set from EventDriven to TagGroup as polled on 60000ms after a gateway restart?

I discovered that that expression is not evaluating because it is dependent on a stand alone query tag that has the same issue as it is stuck in Uncertain_InitialValue. that is still in the old working way as EventDriven. something happened because these worked since implementation for years with many restarts. now I have to spend time to find and change all query tags in both gateways? At least Named queryes are working.