You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
...
The text was updated successfully, but these errors were encountered:
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
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.
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 productblockA
--> this updates DB + cache forX
A
is inusebyX
X
,A
is inusebyX
So far so good.
Now, subscription
Y
is created (or modified) to refer to productblockA
--> this updates DB + cache forY
A
is inusebyX
andY
Y
,A
is inusebyX
andY
X
,A
is inusebyX
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
in_use_by
relations, recursively. In this case it is the cache of the firstdepends_on
layer which needs to be rebuiltThe text was updated successfully, but these errors were encountered: