Skip to content

Conversation

@clarktsiory
Copy link
Contributor

@clarktsiory clarktsiory commented Feb 20, 2025

https://issues.rudder.io/issues/26404

We reorganize the hierarchy of calls that update the properties service :

  • in groups repo : when groups properties change, right after it is changed in LDAP
  • in global parameters repo : after any change in global parameters
  • in node facts repo : there is nothing to change, there is a callback that triggers the policy generation
  • during policy generation we want to sync all with the UI (this unveils the dependency between “generation” and “properties status”, it is only more explicit now), and we do it after the update of dynamic groups, and before querying the updated properties in the repo : we were already doing that previously

TODO

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 updateAll in the repository calls to be non-blocking, and policy generation (and syncProperties that 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.

@clarktsiory
Copy link
Contributor Author

PR updated with a new commit

1 similar comment
@clarktsiory
Copy link
Contributor Author

PR updated with a new commit

…p or global parameters with changed properties

Fixes #26404: Properties cache is not updated when saving group or global parameters with changed properties
…ng group or global parameters with changed properties

Fixes #26404: Properties cache is not updated when saving group or global parameters with changed properties
…en saving group or global parameters with changed properties

Fixes #26404: Properties cache is not updated when saving group or global parameters with changed properties
@clarktsiory
Copy link
Contributor Author

PR updated with a new commit

@clarktsiory clarktsiory changed the base branch from branches/rudder/8.2 to branches/rudder/8.3 August 4, 2025 08:21
@clarktsiory clarktsiory force-pushed the arch_26404/properties_cache_is_not_updated_when_saving_group_or_global_parameters_with_changed_properties branch from 3402a11 to 0f740e4 Compare August 4, 2025 08:21
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.

1 participant