Repository navigation
Conversation
jacomago
reviewed
Oct 23, 2026
| private String cfCleanOnStartup; | ||
|
|
||
| @Value("${recceiver.cf.delete-on-shutdown:true}") | ||
| private String cfDeleteOnShutdown; |
Collaborator
There was a problem hiding this comment.
Are all these options mutually exclusive? Maybe it's better to have a config which is a list of enums.
| return channels; | ||
| } | ||
| Map<String, ChannelFinderChannel> filtered = new LinkedHashMap<>(); | ||
| for (Map.Entry<String, ChannelFinderChannel> channelEntry : channels.entrySet()) { |
Collaborator
There was a problem hiding this comment.
I think you can use a one liner with stream and filter map and then use parallelStream to improve performance
| } | ||
| Map<String, ChannelFinderChannel> filtered = new LinkedHashMap<>(); | ||
| for (Map.Entry<String, ChannelFinderChannel> channelEntry : channels.entrySet()) { | ||
| String status = channelEntry.getValue().property(PV_STATUS_PROPERTY); |
Collaborator
There was a problem hiding this comment.
Don't you want the filter for receiver id?
| * @param channels channels to clean, keyed by name. | ||
| * @param statusIfKept pvStatus to write when channels are kept rather than deleted. | ||
| */ | ||
| private void cleanChannels(Map<String, ChannelFinderChannel> channels, String statusIfKept) { |
Collaborator
There was a problem hiding this comment.
Should statusIfKept be a set? Could also be an enum of statuses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/ControlSystemStudio/phoebus-codeathon/tree/master/projects#services-recsync-003-recceiver-lifecyclestate-cleanup
Should fix:
Reworks how recceiver cleans up its channels in ChannelFinder:
delete-on-cleanchooses how channels are cleaned, andclean-on-startup/clean-on-shutdownchoose when startup and shutdown cleanup happens.Settings
recceiver.cf.delete-on-cleanfalsetrue: delete channels.false: keep them and updatepvStatus. Applies to every cleanup below.recceiver.cf.clean-on-startupfalseInactive, or delete them.false: startup doesn't touch ChannelFinder.recceiver.cf.clean-on-shutdown(new)trueUnknown, or delete them.false: shutdown doesn't touch ChannelFinder.recceiver.cf.delete-on-shutdownclean-on-shutdowntogether withdelete-on-clean.IOC disconnects are always cleaned, as before: their channels are marked
Inactive, or deleted whendelete-on-clean=true.