bbende commented on pull request #5621: URL: https://github.com/apache/nifi/pull/5621#issuecomment-1004934862
Hi @oliness , thanks for contributing. A couple of things to consider here... The implementations of `FlowPersistenceProvider` shouldn't have any knowledge or access to the metadata service, their job is to store and retrieve the content of a flow snapshot, and optionally return metadata if implementing `MetadataAwareFlowPersistenceProvider`. The registry service/framework layer coordinates activities between the metadata service and persistence providers. We'd likely want to expose something on `MetadataAwareFlowPersistenceProvider` that can be called by the service layer to synchronize the provider, or maybe it can be part of the existing call `getMetadata()` and the git implementation just happens to perform the synchronize. Registry is also designed to hold multiple times of versioned items, currently there are flows and bundles (NARs). The `FlowSynchronizer` only populates the database when there are no existing buckets which indicates a brand new database, it was meant to be a one time sync when starting a new registry from an existing git repo. There will have to be a bit more logic to figure out how to update an existing database based on the metadata from git, while also preserving other types of versioned items that may exist in buckets and came from another type of persistence provider. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
