kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Display Builder should not issue CA search requests for "not fully resolved" PV names #530

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

Probably somehow related to #529.

At runtime a widget with a PV name containing a non defined macro is sending CA search requests that inevitably will fails and saturate the network with useless requests.

Moreover, at runtime the Widget 'XXX' (xxx) 'pv_name' is not fully resolved: ... messages should be logged as WARNING or ERROR instead of INFO (that it's fine in editor mode).

kasemir commented 5 years ago

I've increased the log level so unresolved macros are now a warning.

It is, however, outside of the realm of the display to decide if a PV is valid or not. Yes, it will create PVs that may contain unresolved macros, but the underlying issue is the same as generally mistyped PVs: We simply create them, no idea if they will ever be able to connect.

claudio-rosati commented 5 years ago

Thank you Kay.

It is, however, outside of the realm of the display to decide if a PV is valid or not.

Yes, I agree, and it is what I've tried to explain to my colleague. The answer was that, being we recognise there is a problem with the macro leading to a "_pvname is not fully resolved", we should not "create them".

kasemir commented 5 years ago

Other display tools like EDM also search for the names as received, i.e. including unresolved macros.

The bigger issue is typos in PV names. Operational sites tend to use casnooper to locate ongoing PV searches as a result of mistyped PVs. Having the unresolved macros show up together with the other typos is generally helpful.

pavel-ch commented 5 years ago

Tested on Phoebus, but should be the same. This new warning seems to catch too much cases:

claudio-rosati commented 5 years ago

Thank you. Discussion is going on at ESS about what is better to do. The problem is that OPI designers, because in edit mode some macros are known not being defined, just "learn" to not look at the messages in console. And when the OPI is tested and then deployed, still don't look at them because now are used to not do it. I close this issue. If something new come out I'll re-open it or I'll post a PR.