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

Preamble AOF on creation #6865

Closed
oranagra opened this issue Feb 6, 2020 · 3 comments
Closed

Preamble AOF on creation #6865

oranagra opened this issue Feb 6, 2020 · 3 comments

Comments

@oranagra
Copy link
Member

oranagra commented Feb 6, 2020

@antirez,
Now that we have preamble AOF file enabled by default, it affects AOF rewrites, and cases where appendonly config is set at runtime (causing a fork an a rewrite), but there's one case where we still create simple AOF files, which is when the server starts up configured with appendonly and has no pre-existing AOF file on the disk.

There are at least few obvious disadvantages of a simple AOF:

  1. the preamble rdb has some metadata about the server that created it and so on, that we're missing in the simple AOF.
  2. it's a bit odd that some AOF files look different than others in their format. i can imagine a case where someone writes a piece of code that processes AOF files, and tests it only one one case, getting a surprise bug later on when he unexpectedly encounters the other type.
  3. in the rdb, modules can inject some out of keyspace aux data, they may need / want that ability also in freshly created AOF files. some modules may depend on that ability (obviously assuming the module was loaded at startup).

In theory, it should be quite simple to dump an empty RDB file header into the AOF file when creating it on server startup (probably without a fork)

@silvpol
Copy link

silvpol commented Mar 27, 2020

@oranagra
Simple aof file has one very useful feature - you can easily copy it somewhere else and then to re-import cat file | redis-cli --pipe. Currently redis-cli chokes on the new mixed format.

@yossigo
Copy link
Member

yossigo commented Mar 31, 2020

Hi @silvpol, this could actually be a nice redis-cli feature: the ability to load the RDB preamble (as a sequence of RESTORE commands or whatever). It would be much faster as well.

@oranagra
Copy link
Member Author

oranagra commented Aug 7, 2022

the preamble on creation part was handled by #9788
the one about redis-cli mass insertion from rdb, is tracked in #9717

@oranagra oranagra closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants