You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "sam-hn (via GitHub)" <gi...@apache.org> on 2024/04/01 03:09:01 UTC
[I] Slave does not sync key updates during downtime after restart [kvrocks]
sam-hn opened a new issue, #2214:
URL: https://github.com/apache/kvrocks/issues/2214
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/kvrocks/issues) and found no similar issues.
### Version
Kvrocks 2.7.0
### Minimal reproduce step
1. shutdown slave node
2. update key `test1` and create a new key `test2` in master node
3. bring up the slave node and check the keys in slave, `test1` in slave is not updated and `test2` is created
### What did you expect to see?
after restart, slave should have the updated value of `test1`
### What did you see instead?
`test1` key in slave is not updated
### Anything Else?
I also tried updating key `test2` in master node to see if this could trigger the sync of key `test1` between slave and master, but only to find `test2` is updated in slave
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk closed issue #2214: Slave does not sync key updates during downtime after restart
URL: https://github.com/apache/kvrocks/issues/2214
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2029116211
@sam-hn Can you check if the replication is correct while restarting via the command `info replication`. Did you add the `slaveof {maseter_ip} {master_port}` to your slave configuration file? if no, it won't reconnect the master after restarting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2033420092
@sam-hn Thank you, I will have a try soon when I get time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2029596653
@sam-hn I cannot reproduce this issue on my side, what I do is:
```
1. start S1 and S2, and S2 slaveof S1
2. SET a 100 to S1, then shutdown the S2
3. SET a 101 and SET b 1 to S1, then restart S2 and S2 slaveof S1
4. GET a and GET b from S2, and returns 101 and 1
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "sam-hn (via GitHub)" <gi...@apache.org>.
sam-hn commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2033412657
@git-hulk thanks for your test results. This is the exact steps I tried except I was testing with cluster mode.
Then I did another test with two new kvrocks nodes which had cluster mode disabled, and this time I could not reproduce the issue either. After that, I removed db dir and enabled cluster mode on the nodes, called controller API to create new cluster then did the test again, and the issue came back.
So I think the issue only happens with master-slave replication in a cluster. Can you please try the same and see if issue can reproduce this time?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "sam-hn (via GitHub)" <gi...@apache.org>.
sam-hn commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2033947639
[slave-config.txt](https://github.com/apache/kvrocks/files/14849392/slave-config.txt)
attached slave configs which has use-reid-psync enabled
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "sam-hn (via GitHub)" <gi...@apache.org>.
sam-hn commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2033416826
Attached my test results for reference, below is the cluster info
```
10.70.171.222:6672> cluster nodes
qxpiIgvNeJN2DMLgwMwDmud8luIYw6uY7dIEuFtH 10.70.171.222:6673@16673 slave kcf0WSVWymTh6AjTuw1JxL2e4AMNLXgkK9XFSzm8 1712109613610 1712109613611 1 connected
kcf0WSVWymTh6AjTuw1JxL2e4AMNLXgkK9XFSzm8 10.70.171.222:6672@16672 myself,master - 1712109613610 1712109613611 1 connected 0-16383
```
during slave downtime, update a to 101 and create b
```
10.70.171.222:6672> info replication
# Replication
role:master
connected_slaves:0
master_repl_offset:3
10.70.171.222:6672> set a 101
OK
10.70.171.222:6672> set b 1
OK
```
after slave restarted, key a still keeps old value
```
10.70.171.222:6673> keys *
1) "b"
2) "a"
10.70.171.222:6673> get a
"100"
10.70.171.222:6673> get b
"1"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "sam-hn (via GitHub)" <gi...@apache.org>.
sam-hn commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2029240646
> @sam-hn Can you check if the replication is correct while restarting via the command `info replication`. Did you add the `slaveof {maseter_ip} {master_port}` to your slave configuration file? if no, it won't reconnect the master after restarting.
thanks for your feedback.
the replication is correct, `info replication` shows slave is connected, actually slave configuration is not the problem, because slave can sync `test2`-- the new key from master, it's just `test1` key that has problem
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Slave does not sync key updates during downtime after restart [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #2214:
URL: https://github.com/apache/kvrocks/issues/2214#issuecomment-2034190657
> [slave-config.txt](https://github.com/apache/kvrocks/files/14849392/slave-config.txt) attached slave configs which has use-rsid-psync enabled
@sam-hn Thanks for your input. I know what's root cause now, and will submit a PR to resolve this soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org