Fixes #26404: Properties cache is not updated when saving group or global parameters with changed properties #6190
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://issues.rudder.io/issues/26404
We reorganize the hierarchy of calls that update the properties service :
in node facts repo: there is nothing to change, there is a callback that triggers the policy generationTODO
Calls are blocking and may add significant processing time for every method on repos. We need to take into account that the properties computation may be expensive.
This design may lead to repeated calls in the same logical unit (e.g. when updating global parameters from the UI, the UI calls both the global parameters repo and triggers a policy generation), and we will likely have concurrent calls to the same properties computation that may be expensive. But we mostly want the update to be non-blocking.
So we need to change the semantic of the
updateAllin the repository calls to be non-blocking, and policy generation (andsyncPropertiesthat it uses) needs it to be semantically blocking. For that we use a dropping queue with 1 element, and expose a blocking method for the case when blocking is needed.