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:
- 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.
- 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.