Skip to content

Conversation

conorschofield
Copy link
Contributor

@conorschofield conorschofield commented Aug 19, 2025

channelfinder would break with a null runtime exception here. I've added logging and allowed channelfinder to skip over bad pvs instead of breaking.

For example, we were seeing problems populating a new archiver with channel finder and couldn't figure out why it wouldn't work with a specific ioc (it would break with null runtime exception). I added this and figured out that channelfinder was having problems archiving pvs with commas. It looks like it is splitting the pvs with commas causing channelfinder to break when getting the actions for those pvs.

Overall, functionality to fix pvs with commas still needs to be fixed but for now this lets channel finder catch bad pvs and skip over them instead of breaking.

Example:
BTS_____Q6,1___BM02:AtInjection
Aug 19 10:39:13 controls-hlc1.als.lbl.gov java[2889]: 2025-08-19 10:39:13.474 WARN 2889 --- [taskExecutor-89] o.p.c.processors.aa.AAChannelProcessor : archivePVS does not contain pvName: BTS_____Q6 Aug 19 10:39:13 controls-hlc1.als.lbl.gov java[2889]: 2025-08-19 10:39:13.474 WARN 2889 --- [taskExecutor-89] o.p.c.processors.aa.AAChannelProcessor : archivePVS does not contain pvName: 1___BM02:AtInjection

channelfinder would break with a null runtime exception here. I've added logging and allowed channelfinder to skip over bad pvs instead of breaking.
Copy link

@conorschofield conorschofield marked this pull request as draft August 19, 2025 21:20
@conorschofield conorschofield marked this pull request as ready for review August 19, 2025 21:20
@jacomago
Copy link
Contributor

Your naming convention allows PVs with commas! 😥

Does the archiver actually handle that? Both archiving and retrieval of data? Especially the getDataAtTime api?

I would really recommend URL safe pv names if you can.

@conorschofield
Copy link
Contributor Author

Your naming convention allows PVs with commas! 😥

Does the archiver actually handle that? Both archiving and retrieval of data? Especially the getDataAtTime api?

I would really recommend URL safe pv names if you can.

Unfortunately we have some iocs that have pvs with commas (legacy iocs)

To my knowledge some of these pvs with commas are working with the archiver. It could be they are working because of aliases but I am not sure.


List<ArchivePVOptions> archivePVOptionsList = result.get(action);
if (archivePVOptionsList == null) {
logger.log(Level.WARNING, "No list found for action: {0}", action);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure its possible for archivePVOptionsList to be null, see lines 194 to 195.

logger.log(Level.WARNING, "archiverClient.getStatuses returned null");
return result;
}
logger.log(Level.INFO, "Statuses {0}", statuses);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be debug level (or FINER in java logging levels). This could be massive.

result.get(action).add(archivePVS.get(pvName));
});
if (statuses == null) {
logger.log(Level.WARNING, "archiverClient.getStatuses returned null");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be impossible. If you see archiverClient.getStatusesFromPvListQuery and archiverClient.getStatusesFromPvListBody return empty lists rather than null if something goes wrong. Or they should do.

@jacomago
Copy link
Contributor

Have you tried with an archiver > 2.0.9 setting aa.post_support to them. I think posting the list of statuses rather than using a query should work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants