workfloworchestrator / orchestrator-core

The workflow orchestrator core repository
Apache License 2.0
45 stars 15 forks source link

Change validate_workflow to keep domain model cache with insync=false #736

Closed Mark90 closed 2 months ago

Mark90 commented 2 months ago

Currently the @validate_workflow function removes the subscription's domain model from the redis cache. The consequence is that detail queries will need to deserialize the entire subscription from the database, which is noticeably slower and therefore has a performance impact on all applications that query this data.

A validate workflow itself does not change the subscription, so the cache should normally not be any different after it completes. However it currently solves #652 and generally just ensures that the cache has the latest data, so it is important.

The proposal is to instead of removing the entire cached domain model, to update it (to still solve #652) and setting property "insync": true to "insync": false.

Then at the end of the validate workflow -assuming the subscription is indeed in sync- the domain model cache is updated again.

Mark90 commented 2 months ago

https://git.ia.surfsara.nl/netdev/automation/projects/orchestrator/-/issues/2092

pboers1988 commented 2 months ago

Fixed in https://github.com/workfloworchestrator/orchestrator-core/commit/70b0617049dfd25d31cbe3a7e5c8d6e48150f307