Skip to content

Conversation

@conorschofield
Copy link
Contributor

Add timeout seconds and query support override as property value for aa.

When testing LBNL ChannelFinder calls to Archiver Appliance were timing out. I'm adding timeout seconds as an aa property value instead of it being hard coded. The default value is 15 seconds.

Adding an override map to AA_STATUS_ENDPOINT_ONLY_SUPPORT_QUERY_VERSION that is settable as an aa property value. At LBNL our archiver versions are set with our make system and are unconventional
{"etl_version":"Archiver Appliance Version d3dd9cc-2022-08-08-als_SNAPSHOT_09-August-2023T17-53-53","mgmt_version":"Archiver Appliance Version d3dd9cc-2022-08-08-als_SNAPSHOT_09-August-2023T17-53-53","retrieval_version":"Archiver Appliance Version d3dd9cc-2022-08-08-als_SNAPSHOT_09-August-2023T17-53-53","engine_version":"Archiver Appliance Version d3dd9cc-2022-08-08-als_SNAPSHOT_09-August-2023T17-53-53"}

This caused ChannelFinder to use getStatusesFromPVLisBody for Archiver Appliance when our Archiver does not support that. This was causing data buffer limit exception limit on max bytes to buffer.

By setting query_support_override_map you can set the query support override for each archiver.
Example:
aa.query_support_override_map={'arch05': true, 'arch03': true, 'arch-ml': true}

The override value will default to false if the archiver alias name isn't found in the map.

Add timeout seconds and query support override as property value for aa
@conorschofield conorschofield changed the title Timeout and override Timeout and override query support as property values Apr 8, 2025
@jacomago
Copy link
Contributor

jacomago commented Apr 8, 2025

That makes sense, but I wonder about the design. Could you just make AA_STATUS_ENDPOINT_ONLY_SUPPORT_QUERY_VERSION configurable instead? Or is that too much maintenance to keep it up to date?

# Conflicts:
#	src/main/java/org/phoebus/channelfinder/processors/aa/ArchiverClient.java
@conorschofield
Copy link
Contributor Author

That maintenance I think would be too much to keep up to date compared to this solution. Getting the archive version and adding it to ChannelFinder AA_STATUS_ENDPOINT_ONLY_SUPPORT_QUERY_VERSION configurable is less readable and harder to maintain.

Our archiver versions are less meaningful and are not easily associated with the archiver alias. It also might change if our archiver get rebuilt (date at the end could change). Adding d3dd9cc-2022-08-08-als_SNAPSHOT_09-August-2023T17-53-53 to a property value for query version doesn't tell me much at first glance. I'm not sure if this is referring to our 3 minute or 5 minute archiver. While aa.query_support_override_map={'arch05': true} is very clear to me that our 5 minute archiver is choosing to override the query support check.

I will work on fixing the Code Analysis fails.

@conorschofield
Copy link
Contributor Author

The correct this malformed SpEL expression for
@Value("#{${aa.query_support_override_map:{'default': false}}}") seems to be a false positive when using @value to inject directly into a Map: sonar source issue

Copy link
Contributor

@jacomago jacomago left a comment

Choose a reason for hiding this comment

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

Can you also rebase to master. thanks

@tynanford
Copy link
Contributor

Hi @conorschofield , could you also include the new settings in the application.properties file with a comment explaining how they work?

https://github.com/ChannelFinder/ChannelFinderService/blob/master/src/main/resources/application.properties

I guess this new property for query support override should default to false for the "default" archiver in the settings.

Also I'm not sure how common the use case is for multiple archivers with different versions. If we want to simplify the setting it could just be a boolean for all archivers in aa.urls. The map is good, just throwing it out there

aa.query_support_override=true

@jacomago
Copy link
Contributor

Can you also add an update to https://github.com/ChannelFinder/ChannelFinderService/blob/master/src/site/sphinx/aa_processor.rst for the documentation of this configuration.

@conorschofield
Copy link
Contributor Author

Can you also rebase to master. thanks

It is rebased to master my timeoutAndOverride branch and master are the same.

@sonarqubecloud
Copy link

@conorschofield conorschofield requested a review from jacomago April 24, 2025 00:00
@conorschofield conorschofield changed the title Timeout and override query support as property values Timeout and override post support as property values Apr 24, 2025
@jacomago jacomago merged commit 76c50a7 into ChannelFinder:master Apr 24, 2025
6 checks passed
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.

3 participants