Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feast apply can leak resources and create inconsistent state #2116

Closed
pyalex opened this issue Dec 7, 2021 · 0 comments
Closed

Feast apply can leak resources and create inconsistent state #2116

pyalex opened this issue Dec 7, 2021 · 0 comments
Assignees
Labels
kind/bug priority/p0 Highest priority

Comments

@pyalex
Copy link
Collaborator

pyalex commented Dec 7, 2021

Consider feature store with AWS as a configured provider.
When we call feast apply under the hood AwsProvider.update_infra is being called:

def apply(...):
    ... preparation ...
    provider.update_infra(...)
    registry.commit()

Now, update_infra could be a multi-staged operation. For example, current AWS implementation consists of updating online store and then creating Lambda feature server:

def update_infra(...):
    online_store.update(...)
    deploy_lambda_server(...)

When an exception occurs in deploy_lambda_server online store is already created, however since registry.commit() is called only when all infra was successfully updated - these changes will be lost and resources from online store won't be cleaned up properly on teardown.

When number of different components that are managed by the provider will grow even further - the risk to leak resources and create inconsistent state will also increase. Thus, we need to add rollback mechanism, that will be triggered in case of exception.

Expected Behavior

Either all infrastructure is updated or none.

Current Behavior

Infrastructure can be updated partially and the registry will not have records about resources that were actually created.

Steps to reproduce

Specifications

  • Version: 0.15.1
  • Platform:
  • Subsystem:

Possible Solution

Create rollback API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug priority/p0 Highest priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants