Cache is held and managed by connections
Add reconfigure test case. This test previously fails currently due to a regression introduced with the connections changes. Because multiple sources share a connection, a pipeline that does not hold and therefore require any changes in the cache may clear a connections cache before a pipeline that does need said change has an opportunity to add it to the relevant list. Allow connections to manage their cache directly rather than the source doing it vicariously ignorant of other pipelines/sources. Collect the relevant changes from all pipelines and ask any connections holding a cache for that item to keep it on reconfiguration. Co-Authored-By: James E. Blair <jeblair@linux.vnet.ibm.com> Change-Id: I2bf8ba6b9deda58114db9e9b96985a2a0e2a69cb
This commit is contained in:
@@ -62,3 +62,10 @@ class BaseConnection(object):
|
||||
|
||||
def registerUse(self, what, instance):
|
||||
self.attached_to[what].append(instance)
|
||||
|
||||
def maintainCache(self, relevant):
|
||||
"""Make cache contain relevant changes.
|
||||
|
||||
This lets the user supply a list of change objects that are
|
||||
still in use. Anything in our cache that isn't in the supplied
|
||||
list should be safe to remove from the cache."""
|
||||
|
||||
Reference in New Issue
Block a user