Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] inuseby relations not updated in domain model cache #652

Open
Mark90 opened this issue May 16, 2024 · 2 comments
Open

[Bug] inuseby relations not updated in domain model cache #652

Mark90 opened this issue May 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working waiting

Comments

@Mark90
Copy link
Contributor

Mark90 commented May 16, 2024

Problem

The domain model cache contains inuseby relations that mirror the relations in the database. The problem is that these are not automatically updated for all subscriptions.

Example:

Subscription X is created with productblock A --> this updates DB + cache for X

  • In the database, A is inuseby X
  • In the cached model of X, A is inuseby X

So far so good.

Now, subscription Y is created (or modified) to refer to productblock A --> this updates DB + cache for Y

  • In the database, A is inuseby X and Y
  • In the cached model of Y, A is inuseby X and Y
  • In the cached model of X, A is inuseby X

The last line shows the error.

Impact

The "Service configuration" tab in the orchestrator-UI which gets its product block information from cache (through graphql) will show outdated information.

It is resolved by running a validation workflow on X to update it in the cache, but as of now that does not happen automatically.

Possible solutions

  • Somehow invalidate cache + trigger validation of all related subscriptions after a create/modify. This could potentially be a lot of subscriptions, and I'm not sure if it has any other side effects
    • As discussed in meeting 22/05: we're already rebuilding the cache of all in_use_by relations, recursively. In this case it is the cache of the first depends_on layer which needs to be rebuilt
  • Don't cache inusebyids/relations at all, query them on demand and add them in the dict read from cache
  • ...
@Mark90 Mark90 added bug Something isn't working triage Issue that need to be triaged labels May 16, 2024
@Mark90 Mark90 changed the title [Bug] [Medium] inuseby relations not updated in domain model cache [Bug] inuseby relations not updated in domain model cache May 16, 2024
@srichmond srichmond added the code sprint ticket Berkeley visit label Dec 4, 2024
@wouter1975 wouter1975 removed the code sprint ticket Berkeley visit label Jan 29, 2025
@wouter1975
Copy link
Contributor

A SURF is created to address the loading times of the domain modal from Postgres. If this improvement has comparable performance speed as the Redis cache, this ticket can be closed.

@Mark90 Mark90 self-assigned this Feb 10, 2025
@Mark90
Copy link
Contributor Author

Mark90 commented Feb 10, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting
Projects
None yet
Development

No branches or pull requests

4 participants