Skip to content

Module auxiliary data broken when using AOF and aof-use-rdb-preamble set to no #7350

@yoav-steinberg

Description

@yoav-steinberg

Module auxiliary data isn't written to AOF files when there's no rdb-preamble to the AOF.
This means modules can lose their aux data.
Possible solutions:

  1. If a loaded module implements the aof_rewrite callback then implicitly ignore the aof-use-rdb-preamble config option and treat it as yes all the time.
  2. Add another callback to modules that's called before/after the all the aof_rewrite callbacks for all the keys. In this callback the module can write a set of commands to the aof to store initialize whatever aux data it needs. This can also be done by extending the when option of the aux_load and aux_save callbacks to indicate REDISMODULE_AUX_BEFORE_AOFRW and REDISMODULE_AUX_AFTER_AOFRW.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions