Skip to content

Redis can delete incorrect keys #2150

Closed

Description

@judahrand

I haven't tested this explicitly but from the data model + this function it looks to be as if two FeatureViews have the same Entities (but are different tables) and one view is deleted the online keys for the other view will also be deleted... This seems like a bit of a flaw either in the Redis data model or in the deletion mechanism.

def delete_table_values(self, config: RepoConfig, table: FeatureView):
client = self._get_client(config.online_store)
deleted_count = 0
pipeline = client.pipeline()
prefix = _redis_key_prefix(table.entities)
for _k in client.scan_iter(
b"".join([prefix, b"*", config.project.encode("utf8")])
):
pipeline.delete(_k)
deleted_count += 1
pipeline.execute()
logger.debug(f"Deleted {deleted_count} keys for {table.name}")

Activity

  1. felixwang9817 commented on Dec 17, 2021

    @felixwang9817
    Collaborator

    good catch - briefly looking at the code, I'm not even convinced that the key we're using to delete matches the key for insertion (e.g. we might be deleting nothing at all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions