Skip to content

Conversation

@yoav-steinberg
Copy link
Contributor

@yoav-steinberg yoav-steinberg commented Dec 20, 2021

This is needed in order to ease the deployment of functions for ephemeral cases, where user needs to spin up a server with functions pre-loaded.
See #9899 (comment) and following comments.

Details:

  • Added --functions-rdb option to redis-cli.
  • Functions only rdb via REPLCONF rdb-filter-only functions. This is a placeholder for a space separated inclusion filter for the RDB. In the future can be REPLCONF rdb-filter-only "functions db:3 key-patten:user*" and a complementing rdb-filter-exclude REPLCONF can also be added.
  • Handle "slave requirements" specification to RDB saving code so we can use the same RDB when different slaves express the same requirements (like functions-only) and not share the RDB when their requirements differ. This is currently just a flags int, but can be extended to a more complex structure with various filter fields.
  • make sure to support filters only in diskless replication mode (not to override the persistence file), we do that by forcing diskless (even if disabled by config)

other changes:

  • some refactoring in rdb.c (extract portion of a big function to a sub-function)
  • rdb_key_save_delay used in AOFRW too

TODO:

  • tests.
  • handles TODOs in the PR code.

@yoav-steinberg yoav-steinberg marked this pull request as ready for review December 20, 2021 16:07
@oranagra oranagra changed the title Functions only rdb Generate RDB with Functions only via redis-cli --functions-rdb Dec 28, 2021
@oranagra oranagra added approval-needed Waiting for core team approval to be merged release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus labels Dec 28, 2021
@oranagra
Copy link
Member

@redis/core-team please approve (see details in the top comment)

yoav-steinberg and others added 2 commits December 29, 2021 12:38
Co-authored-by: sundb <sundbcn@gmail.com>
Copy link
Collaborator

@yossigo yossigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but did not do a complete code review).

Co-authored-by: sundb <sundbcn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval-needed Waiting for core team approval to be merged release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants