Skip to content

load rdb if aof not exist - #1566

Closed
idning wants to merge 1 commit into
redis:unstablefrom
idning:patch-1
Closed

idning wants to merge 1 commit into
redis:unstablefrom
idning:patch-1

Conversation

@idning

@idning idning commented Feb 26, 2014

Copy link
Copy Markdown

when Both rdb and aof is enabled, redis can not load data from rdb file.

we do backup with rdb because it is compressed.
when I want to recover from backup, I just copy the rdb file, make sure aof file is not exists,
but redis does not load the rdb file.

when both rdb and aof is enabled, redis can not load data from rdb file.

we want to backup with rdb because it is compressed. 
when we want to recover from backup, we copy the rdb file, make sure aof file is not exists, 
but redis does not load the rdb file.
@yoav-steinberg

Copy link
Copy Markdown
Contributor

In general if you have AOF enabled you'd prefer to load it and not the RDB.
In some cases there might be value to restoring an old RDB over loading the AOF (recovery time).
The easy solution would be to disable AOF and then re-enable it after the RDB is loaded.
The problem with the auto-fallback approach here is that you might end up with outdated data without noticing it, especially if you're configured for both RDB snapshots and AOF.

I also think that once we have multi part AOF with an RDB preamble you'll be able to just delete all the AOF files and put your backup as the first AOF part which will achieve the same thing. (#6584)

Given all that I'm marking this to be closed.

@yoav-steinberg yoav-steinberg added the state:to-be-closed requesting the core team to close the issue label Oct 4, 2021
@enjoy-binbin

Copy link
Copy Markdown
Contributor

also see #12762

sundb pushed a commit to sundb/redis that referenced this pull request Oct 31, 2025
… object (redis#1566)

Currently, only int and shared.redacted call makeObjectShared for
shared objects.

Although this breaks the blame log, there is a few points i would
like to mention:
1. For threading, our fork for some reasons calling decrRefCount in
   the threads for shared.command. Although this is not used in OSS
   code now, it may be a issue in the future.
2. For cleanup, all shared objects's refcount should be the same.
3. For CoW, probably can reduce CoW although it is very minor.

We decided in redis#2189 to keep `extended-redis-compatibility` for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:to-be-closed requesting the core team to close the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants