This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
Replies: 1 comment 1 reply
-
@rickfish @mactaggart if you have any thoughts about the cache in @bfrggit Other implementations also have a cache. Netflix uses the For your use-case, I see 2 options,
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PostgresMetadataDAO
: https://github.com/Netflix/conductor/blob/main/postgres-persistence/src/main/java/com/netflix/conductor/postgres/dao/PostgresMetadataDAO.javaNote that Ln 41 creates a concurrent hash map of in-memory cache of task definitions.
We are trying to build a stateless microservice on top of Netflix Conductor. The existence of this cache breaks statelessness of the service and causes inconsistency on distributed cluster -- Consider that we have 2 instances of our service using the same PostgreSQL DB as the persistence. IF a delete call is sent to instance 1, then there is no way that the deleted task def can be ever deleted from instance 2.
Note that Ln 100, the deletion from cache only happens if the task def is successfully deleted from DB. Also, even if this is not the issue, it is still possible that when I delete the task def from instance 1 and DB, a read operation of the same task def can still return the deleted entity from instance 2 cache.
Any thoughts? Are other DB persistence metadata DAOs doing the same?
We'd like to understand the considerations behind having this cache. Why is it necessary and what is the potential impact of disabling/circumventing it. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions