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

[BUG] Inspite of disabling the redis persistance both AOF and RDB, RDB is loading keys of diffrent master leading to keys importing #10457

Open
sreenivasvp opened this issue Mar 21, 2022 · 7 comments

Comments

@sreenivasvp
Copy link

Inspite of disabling the redis persistance both AOF and RDB, RDB is loading keys of diffrent master leading to keys importing
Our redis configuration details :
***** Redis Configuration details *****

cluster-node-timeout 60000
cluster-slave-validity-factor 3
cluster-allow-reads-when-down no
appendonly no
save ""
cluster-enabled yes
cluster-config-file nodes-redis.conf
dir /var/lib/redis
protected-mode no

We see that nodes.conf
***** nodes-redis.conf details *****
ef1d9da0aee94b41ae4bfe17c5b8c2e22527fd35 10.192.210.19:6379@16379 myself,master - 0 1646379500000 8 connected 5461-10922

While bootup, we see -> Done loading RDB, keys loaded: 2, keys expired: 0.
Keys are from diffferrnt master leading to slot importing
15:M 17 Mar 2022 22:57:16.512 # I have keys for slot 11794, but the slot is assigned to another node. Setting it to importing state.
15:M 17 Mar 2022 22:57:16.512 # I have keys for slot 13796, but the slot is assigned to another node. Setting it to importing state.

Snippet of boot log :

Starting redis server

15:C 17 Mar 2022 22:57:16.498 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
15:C 17 Mar 2022 22:57:16.498 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=15, just started
15:C 17 Mar 2022 22:57:16.498 # Configuration loaded
15:M 17 Mar 2022 22:57:16.499 * monotonic clock: POSIX clock_gettime
15:M 17 Mar 2022 22:57:16.507 * Node configuration loaded, I'm ef1d9da0aee94b41ae4bfe17c5b8c2e22527fd35
15:M 17 Mar 2022 22:57:16.508 * Running mode=cluster, port=6379.
15:M 17 Mar 2022 22:57:16.508 # Server initialized
15:M 17 Mar 2022 22:57:16.512 * Loading RDB produced by version 6.2.6
15:M 17 Mar 2022 22:57:16.512 * RDB age 1178334 seconds
15:M 17 Mar 2022 22:57:16.512 * RDB memory usage when created 8.17 Mb
15:M 17 Mar 2022 22:57:16.512 # Done loading RDB, keys loaded: 2, keys expired: 0.
15:M 17 Mar 2022 22:57:16.512 * DB loaded from disk: 0.003 seconds
15:M 17 Mar 2022 22:57:16.512 # I have keys for slot 11794, but the slot is assigned to another node. Setting it to importing state.
15:M 17 Mar 2022 22:57:16.512 # I have keys for slot 13796, but the slot is assigned to another node. Setting it to importing state.

@sreenivasvp
Copy link
Author

@madolson @oranagra
Please help on the same..

@oranagra
Copy link
Member

@sreenivasvp on startup, redis loads data from the rdb file referred to by the dbfilename config, even if save is disabled.
so maybe you just need to delete the file...

@sreenivasvp
Copy link
Author

@oranagra
The startup that I am referring to is master pod/node restarted on running cluster and that pod/node is comming back.

rdb is always read at boot only is it ??

@oranagra
Copy link
Member

yes, rdb is always loaded at boot time if exists. and the only other place it can be loaded is when a replica connects to a master.
please wait for @madolson to respond regarding the cluster configuration and importing state.

@sreenivasvp
Copy link
Author

@oranagra
The reason I asked rdb is always read at boot only is it ?? is :
I was thinking, to delete the rdb file on each bootup irrespective of master/slave when it comes-up/starts back, so as to avoid issues from cluster getting corrupted / down.

Sure will wait for @madolson wrt cluster configuration and importing state.

@sreenivasvp
Copy link
Author

@oranagra
Any inputs on below please :
Thinking, to delete the rdb file on each bootup irrespective of master/slave when it comes-up/starts back, so as to avoid issues from cluster getting corrupted / down.

@markrity
Copy link

markrity commented Oct 5, 2023

I had the same issue, tried everything to make it stop writing to dump.rdb.

The solution was to use add to config file this line:

save ""

Worked like magic.

Also from what I have seen that problem happens only on version 6 and 7, on Redis 4 , it works without it, only commenting #save out disables the writes to dump.rdb .

Have not tested Redis 5.

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